Skip to content

Commit c3bce5f

Browse files
committed
Update deploy.yml
1 parent b029cba commit c3bce5f

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

.github/workflows/deploy.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,46 @@ jobs:
3131
- name: Install dependencies
3232
run: npm i
3333

34-
- name: Clean previous build
35-
run: rm -rf dist
36-
3734
- name: Generate static site
3835
run: |
3936
npm run build:all
40-
ls -la dist
41-
rm -rf node_modules scripts data templates
37+
ls -la
38+
4239
env:
43-
OUTPUT_DIR: ./dist # Changed from ./ to ./dist
44-
40+
NODE_ENV: production
41+
OUTPUT_DIR: ./
42+
4543
- name: Upload build artifact
4644
uses: actions/upload-artifact@v4
4745
with:
48-
name: site-build
49-
path: dist # Only include the dist directory
46+
name: site-build-files
47+
path: ./
48+
if-no-files-found: error
5049

5150
deploy:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
permissions:
54+
pages: write
55+
id-token: write
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
5259
steps:
53-
- name: Clean workspace
54-
run: rm -rf *
55-
5660
- name: Download build artifact
5761
uses: actions/download-artifact@v4
5862
with:
59-
name: site-build
60-
path: dist # Extract to dist directory
61-
63+
name: site-build-files
64+
path: ./
65+
66+
- name: Setup Pages
67+
uses: actions/configure-pages@v4
68+
6269
- name: Upload GitHub Pages artifact
6370
uses: actions/upload-pages-artifact@v3
6471
with:
65-
path: dist # Deploy from dist
72+
path: ./
73+
74+
- name: Deploy to GitHub Pages
75+
id: deployment
76+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)