Skip to content

Commit 1a8fc99

Browse files
committed
Deploy: Upload entire .next folder
1 parent a344930 commit 1a8fc99

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,15 @@ jobs:
2727
2828
- name: Archive standalone output
2929
run: |
30-
mkdir output
31-
cp -r .next/standalone output/standalone
32-
cp -r .next/static output/static
33-
cp -r public output/public
34-
tar -czf output.tar.gz -C output .
30+
tar -czf next.tar.gz .next
3531
3632
- name: Copy build to EC2
3733
uses: appleboy/[email protected]
3834
with:
3935
host: ${{ secrets.AWS_EC2_SSH_HOST }}
4036
username: ${{ secrets.AWS_EC2_SSH_USERNAME }}
4137
key: ${{ secrets.AWS_EC2_SSH_PRIVATE_KEY }}
42-
source: "output.tar.gz"
38+
source: "next.tar.gz"
4339
target: "~/app"
4440

4541
- name: Deploy on EC2
@@ -54,7 +50,7 @@ jobs:
5450
5551
rm -rf server
5652
mkdir -p server
57-
tar -xzf output.tar.gz -C server
53+
tar -xzf next.tar.gz -C server
5854
5955
pm2 delete website || true
6056
pm2 start ecosystem.config.js

0 commit comments

Comments
 (0)