Skip to content

Commit 91d6e5e

Browse files
committed
Update deploy.yml
1 parent 07f0758 commit 91d6e5e

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,38 @@ 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
4037
ls -la
41-
# Clean development artifacts
4238
rm -rf node_modules
39+
env:
40+
NODE_ENV: production
41+
OUTPUT_DIR: ./
42+
43+
- name: Upload build artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: site-build-files
47+
path: ./
48+
if-no-files-found: error
4349

4450
deploy:
4551
needs: build
4652
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 }}
4759
steps:
48-
- name: Clean workspace
49-
run: rm -rf *
50-
5160
- name: Download build artifact
5261
uses: actions/download-artifact@v4
5362
with:
5463
name: site-build-files
5564
path: ./
5665

57-
- name: Remove CI files
58-
run: rm -rf .github
59-
6066
- name: Setup Pages
6167
uses: actions/configure-pages@v4
6268

0 commit comments

Comments
 (0)