File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ -P ubuntu-latest=node:24-bookworm
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Deploy static content to Pages
2+
3+ on :
4+ push :
5+ branches : [master]
6+ workflow_dispatch :
7+
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.ref }}
10+ cancel-in-progress : true
11+
12+ # 优化:收紧了 contents 权限
13+ permissions :
14+ contents : read
15+ id-token : write
16+ pages : write
17+
18+ jobs :
19+ docs :
20+ runs-on : ubuntu-latest
21+ environment :
22+ name : github-pages
23+ url : ${{ steps.deployment.outputs.page_url }}
24+ steps :
25+ - uses : actions/checkout@v4
26+ with :
27+ fetch-depth : 0
28+
29+ - name : Setup Node.js
30+ uses : actions/setup-node@v4
31+ with :
32+ node-version : " 24"
33+
34+ - name : Install dependencies
35+ run : npm ci
36+
37+ - name : Build site
38+ run : npm run build
39+
40+ - name : Update Algolia Index
41+ if : github.actor != 'nektos/act'
42+ env :
43+ HEXO_ALGOLIA_INDEXING_KEY : ${{ secrets.HEXO_ALGOLIA_INDEXING_KEY }}
44+ run : npm run algolia
45+
46+ - name : Upload GitHub Pages artifact
47+ if : github.actor != 'nektos/act'
48+ uses : actions/upload-pages-artifact@v3
49+ with :
50+ path : ./public
51+
52+ - name : Deploy to GitHub Pages
53+ id : deployment
54+ if : github.ref == 'refs/heads/master' && github.actor != 'nektos/act'
55+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -6,5 +6,4 @@ node_modules/
66public /
77.deploy * /
88_multiconfig.yml
9- package-lock.json
109yarn.lock
You can’t perform that action at this time.
0 commit comments