Skip to content

Commit 5fd0140

Browse files
authored
fix(ci): recreate Next.js assets before FTP deploy (#10)
1 parent d459a1a commit 5fd0140

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,18 @@ jobs:
3535
echo "Build output files:"
3636
find out/ -type f | head -10
3737
38-
- name: Deploy to FTP (Production)
38+
- name: Recreate and deploy Next.js assets
39+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
40+
uses: SamKirkland/FTP-Deploy-Action@4.3.0
41+
with:
42+
server: ${{ secrets.FTP_HOST }}
43+
username: ${{ secrets.FTP_USERNAME }}
44+
password: ${{ secrets.FTP_PASSWORD }}
45+
local-dir: ./out/_next/
46+
server-dir: ./_next/
47+
dangerous-clean-slate: true
48+
49+
- name: Deploy site files to FTP
3950
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
4051
uses: SamKirkland/FTP-Deploy-Action@4.3.0
4152
with:
@@ -49,5 +60,6 @@ jobs:
4960
**/.git*/**
5061
**/node_modules/**
5162
**/.DS_Store
63+
**/_next/**
5264
dry-run: false
5365

0 commit comments

Comments
 (0)