File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Deploy to GitHub Pages
22
33on :
4+ # Runs on pushes targeting the default branch
45 push :
5- branches :
6- - main # 或者 master,取决于你的主分支名称
6+ branches : ['main']
7+
8+ # Allows you to run this workflow manually from the Actions tab
9+ workflow_dispatch :
710
811permissions :
912 contents : write
1013
14+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+ concurrency :
17+ group : ' pages'
18+ cancel-in-progress : false
19+
1120jobs :
1221 build-and-deploy :
22+ environment :
23+ name : github-pages
24+ url : ${{ steps.deployment.outputs.page_url }}
1325 runs-on : ubuntu-latest
1426 steps :
1527 - name : Checkout
2739 - name : Build
2840 run : npm run build-only
2941
30- - name : Deploy to GitHub Pages
31- uses : JamesIves/github-pages-deploy-action@v4
42+ - name : Setup Pages
43+ uses : actions/configure-pages@v5
44+
45+ - name : Upload artifact
46+ uses : actions/upload-pages-artifact@v3
3247 with :
33- folder : dist # Vite 构建输出目录
34- branch : gh-pages # 部署分支
48+ # Upload entire repository
49+ path : ' ./dist'
50+
51+ - name : Deploy to GitHub Pages
52+ id : deployment
53+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments