File tree Expand file tree Collapse file tree 1 file changed +30
-16
lines changed Expand file tree Collapse file tree 1 file changed +30
-16
lines changed Original file line number Diff line number Diff line change 1- name : Deploy Docusaurus to GitHub Pages
2-
3- env :
4- NODE_OPTIONS : --max_old_space_size=4096
1+ name : Deploy to GitHub Pages
52
63on :
74 push :
85 branches :
96 - main
7+ workflow_dispatch :
108
119jobs :
12- deploy :
10+ build :
11+ name : Build Docusaurus
1312 runs-on : ubuntu-latest
1413 steps :
15- - name : Checkout code
16- uses : actions/checkout@v4
17-
18- - name : Setup Node.js
19- uses : actions/setup-node@v4
14+ - uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0
17+ - uses : actions/setup-node@v4
2018 with :
21- node-version : 18
19+ node-version : 18.x
20+ cache : npm
2221
2322 - name : Install dependencies
2423 run : npm ci
25-
2624 - name : Build website
2725 run : npm run build
2826
29- - name : Deploy to GitHub Pages
30- uses : peaceiris/ actions-gh- pages@v4
27+ - name : Upload Build Artifact
28+ uses : actions/upload- pages-artifact@v3
3129 with :
32- github_token : ${{ secrets.GITHUB_TOKEN }}
33- publish_dir : ./build
30+ path : build
31+
32+ deploy :
33+ name : Deploy to GitHub Pages
34+ needs : build
35+
36+ permissions :
37+ pages : write
38+ id-token : write
39+
40+ environment :
41+ name : github-pages
42+
43+ runs-on : ubuntu-latest
44+ steps :
45+ - name : Deploy to GitHub Pages
46+ id : deployment
47+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments