File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change 55 branches : [ main ]
66 workflow_dispatch :
77
8+ # 设置GITHUB_TOKEN的权限
89permissions :
910 contents : read
1011 pages : write
1112 id-token : write
1213
14+ # 允许一个并发部署
1315concurrency :
1416 group : " pages"
1517 cancel-in-progress : false
1618
1719jobs :
18- build :
20+ # 单个部署工作流
21+ build-and-deploy :
22+ environment :
23+ name : github-pages
24+ url : ${{ steps.deployment.outputs.page_url }}
1925 runs-on : ubuntu-latest
2026 steps :
2127 - name : Checkout
2228 uses : actions/checkout@v4
29+
2330 - name : Setup Node
2431 uses : actions/setup-node@v4
2532 with :
2633 node-version : " 18"
2734 cache : ' npm'
35+
36+ - name : Setup Pages
37+ uses : actions/configure-pages@v4
38+
2839 - name : Install dependencies
2940 run : npm ci
41+
3042 - name : Build
3143 run : npm run build
44+
3245 - name : Upload artifact
3346 uses : actions/upload-pages-artifact@v3
3447 with :
3548 path : ./out
36-
37- deploy :
38- environment :
39- name : github-pages
40- url : ${{ steps.deployment.outputs.page_url }}
41- runs-on : ubuntu-latest
42- needs : build
43- steps :
49+
4450 - name : Deploy to GitHub Pages
4551 id : deployment
46- uses : actions/deploy-pages@v3
52+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments