File tree Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches : [main]
6
6
7
+ permissions :
8
+ contents : read
9
+ pages : write
10
+ id-token : write
11
+
12
+ concurrency :
13
+ group : pages
14
+ cancel-in-progress : true
15
+
7
16
jobs :
8
- deploy :
17
+ build :
9
18
runs-on : ubuntu-latest
10
19
steps :
11
20
- name : Checkout
@@ -15,17 +24,24 @@ jobs:
15
24
uses : actions/setup-node@v4
16
25
with :
17
26
node-version : 18
18
- cache : npm
19
27
20
28
- name : Install dependencies
21
29
run : npm install
22
30
23
31
- name : Build docs
24
32
run : npx vitepress build docs
25
33
26
- - name : Deploy to GitHub Pages
27
- uses : peaceiris/ actions-gh- pages@v3
34
+ - name : Upload artifact
35
+ uses : actions/upload- pages-artifact @v3
28
36
with :
29
- github_token : ${{ secrets.GITHUB_TOKEN }}
30
- publish_dir : docs/.vitepress/dist
31
- publish_branch : gh-pages # 改成 gh-pages
37
+ path : docs/.vitepress/dist
38
+
39
+ deploy :
40
+ environment :
41
+ name : github-pages
42
+ url : ${{ steps.deployment.outputs.page_url }}
43
+ runs-on : ubuntu-latest
44
+ needs : build
45
+ steps :
46
+ - name : Deploy to GitHub Pages
47
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments