Skip to content

Commit

Permalink
Merge pull request #1579 from hngprojects/Ravencodess-patch-1
Browse files Browse the repository at this point in the history
Ravencodess patch 1
  • Loading branch information
Ravencodess authored Oct 29, 2024
2 parents 6a032d1 + df04aa2 commit 183d868
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/production-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: pnpm build

- name: Archive production artifacts
run: tar -czf nextjs-prod.tar.gz .next public .env
run: tar -czf nextjs-prod.tar.gz .next .env

- name: Copy to server
uses: appleboy/scp-action@master
Expand All @@ -64,6 +64,11 @@ jobs:
password: ${{ secrets.PASSWORD }}
script: |
cd ~/hng_boilerplate_nextjs/prod
tar -xzf nextjs-prod.tar.gz
rm -f nextjs-prod.tar.gz
git add .
git stash
git reset --hard
git pull
tar -xzf nextjs-staging.tar.gz
rm -f nextjs-staging.tar.gz
pnpm install
pm2 restart boilerplate_fe_prod --update-env
8 changes: 6 additions & 2 deletions .github/workflows/staging-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: pnpm build

- name: Archive production artifacts
run: tar -czf nextjs-staging.tar.gz .next public .env
run: tar -czf nextjs-staging.tar.gz .next .env

- name: Copy to server
uses: appleboy/scp-action@master
Expand All @@ -64,7 +64,11 @@ jobs:
password: ${{ secrets.PASSWORD }}
script: |
cd ~/hng_boilerplate_nextjs/staging
git add .
git stash
git reset --hard
git pull
tar -xzf nextjs-staging.tar.gz
rm -f nextjs-staging.tar.gz
cp -r .next/standalone/* .
pnpm install
pm2 restart boilerplate_fe_staging --update-env

0 comments on commit 183d868

Please sign in to comment.