We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4e03e9 commit 9c8d7cbCopy full SHA for 9c8d7cb
.github/workflows/main.yml
@@ -0,0 +1,34 @@
1
+name: Deploy to GitHub Pages
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main # 或者 master,取决于你的主分支名称
7
8
+permissions:
9
+ contents: write
10
11
+jobs:
12
+ build-and-deploy:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@v4
17
18
+ - name: Setup Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: '20'
22
+ cache: 'npm'
23
24
+ - name: Install Dependencies
25
+ run: npm ci
26
27
+ - name: Build
28
+ run: npm run build-only
29
30
+ - name: Deploy to GitHub Pages
31
+ uses: JamesIves/github-pages-deploy-action@v4
32
33
+ folder: dist # Vite 构建输出目录
34
+ branch: gh-pages # 部署分支
0 commit comments