File tree Expand file tree Collapse file tree 1 file changed +38
-18
lines changed Expand file tree Collapse file tree 1 file changed +38
-18
lines changed Original file line number Diff line number Diff line change 88 # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
99 # Allows you to run this workflow manually from the Actions tab
1010 workflow_dispatch :
11+
12+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+ permissions :
14+ contents : read
15+ pages : write
16+ id-token : write
17+
18+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+ concurrency :
21+ group : " pages"
22+ cancel-in-progress : false
23+
1124jobs :
1225 deploy :
1326 name : Deploy to GitHub Pages
1427 runs-on : ubuntu-latest
28+ environment :
29+ name : github-pages
30+ url : ${{ steps.deployment.outputs.page_url }}
1531 steps :
16- - uses : actions/checkout@v2
17- - uses : actions/setup-node@v3
32+ - name : Checkout
33+ uses : actions/checkout@v4
34+
35+ - name : Setup Node
36+ uses : actions/setup-node@v4
1837 with :
19- node-version : 18
38+ node-version : 22
2039 cache : npm
21- - name : Configure Git
22- run : |
23- git config user.name "Publisher"
24- git config user.email "[email protected] " 25- - name : Build website
26- run : npm install
40+
41+ - name : Install dependencies
42+ run : npm ci
43+
2744 - name : Build website
2845 run : npm run build
29- - name : Switch to branch 'gh-pages'
30- run : |
31- git branch -f gh-pages HEAD
32- git checkout gh-pages
33- - run : |
34- cp CNAME build/CNAME
35- git add -f build/
36- git commit -m "Publish"
37- git push -f origin `git subtree split -P build`:refs/heads/gh-pages
46+
47+ - name : Setup Pages
48+ uses : actions/configure-pages@v5
49+
50+ - name : Upload artifact
51+ uses : actions/upload-pages-artifact@v3
52+ with :
53+ path : ./build
54+
55+ - name : Deploy to GitHub Pages
56+ id : deployment
57+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments