We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ebbfc60 + cc791a4 commit 16504c3Copy full SHA for 16504c3
1 file changed
.github/workflows/vue-deploy.yml
@@ -0,0 +1,43 @@
1
+name: Deploy to GitHub Pages
2
+
3
+on:
4
+ push:
5
+ branches: [ "main" ]
6
7
+jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
11
+ permissions:
12
+ contents: write
13
+ pages: write
14
+ id-token: write
15
16
+ environment:
17
+ name: github-pages
18
+ url: ${{ steps.deployment.outputs.page_url }}
19
20
+ steps:
21
+ - uses: actions/checkout@v4
22
23
+ # 设置 Node.js 22 环境
24
+ - uses: actions/setup-node@v4
25
+ with:
26
+ node-version: '22'
27
28
+ # 安装依赖并构建
29
+ - name: Install and build
30
+ run: |
31
+ npm install
32
+ npm run build
33
34
+ # 上传构建产物
35
+ - name: Upload artifact
36
+ uses: actions/upload-pages-artifact@v3
37
38
+ path: ./dist
39
40
+ # 部署到 GitHub Pages
41
+ - name: Deploy to GitHub Pages
42
+ id: deployment
43
+ uses: actions/deploy-pages@v4
0 commit comments