File tree Expand file tree Collapse file tree 1 file changed +27
-16
lines changed Expand file tree Collapse file tree 1 file changed +27
-16
lines changed Original file line number Diff line number Diff line change @@ -31,35 +31,46 @@ jobs:
31
31
- name : Install dependencies
32
32
run : npm i
33
33
34
- - name : Clean previous build
35
- run : rm -rf dist
36
-
37
34
- name : Generate static site
38
35
run : |
39
36
npm run build:all
40
- ls -la dist
41
- rm -rf node_modules scripts data templates
37
+ ls -la
38
+
42
39
env :
43
- OUTPUT_DIR : ./dist # Changed from ./ to ./dist
44
-
40
+ NODE_ENV : production
41
+ OUTPUT_DIR : ./
42
+
45
43
- name : Upload build artifact
46
44
uses : actions/upload-artifact@v4
47
45
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
50
49
51
50
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 }}
52
59
steps :
53
- - name : Clean workspace
54
- run : rm -rf *
55
-
56
60
- name : Download build artifact
57
61
uses : actions/download-artifact@v4
58
62
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
+
62
69
- name : Upload GitHub Pages artifact
63
70
uses : actions/upload-pages-artifact@v3
64
71
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
You can’t perform that action at this time.
0 commit comments