Skip to content

Commit 1b9c4bf

Browse files
authored
Create static.yml
1 parent f73f1ea commit 1b9c4bf

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/static.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy Static Site to Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # 获取完整提交历史
21+
22+
- name: Configure Pages
23+
id: pages
24+
uses: actions/configure-pages@v5
25+
26+
- name: Upload Artifact
27+
uses: actions/upload-pages-artifact@v3
28+
with:
29+
# 直接使用已提交的静态文件
30+
path: ./public
31+
32+
- name: Deploy to GitHub Pages
33+
id: deployment
34+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)