File tree Expand file tree Collapse file tree 2 files changed +13
-80
lines changed Expand file tree Collapse file tree 2 files changed +13
-80
lines changed Original file line number Diff line number Diff line change 1
1
name : build
2
2
3
3
on :
4
- push :
5
- branches :
6
- - " master"
7
-
8
- permissions :
9
- contents : write
10
- pages : write
11
- id-token : write
4
+ - pull_request
5
+ - push
12
6
13
7
jobs :
14
8
build :
15
- environment :
16
- name : github-pages
17
- url : ${{ steps.deployment.outputs.page_url }}
18
9
runs-on : ubuntu-latest
19
10
steps :
20
11
- uses : actions/checkout@v4
53
44
globs : |
54
45
docs/**/*.md
55
46
README.md
47
+
56
48
- name : Stop and report errors
57
49
run : |
58
50
git add -A
@@ -66,18 +58,25 @@ jobs:
66
58
mkdocs -v build
67
59
: > site/.nojekyll
68
60
echo -n '201.ustclug.org' > site/CNAME
61
+
69
62
- name : Upload artifact
70
- if : github.ref == 'refs/heads/master'
71
63
uses : actions/upload-pages-artifact@v3
72
64
with :
73
65
path : site
66
+
67
+ deploy :
68
+ needs : build
69
+ if : github.ref == 'refs/heads/master'
70
+ environment :
71
+ name : github-pages
72
+ url : ${{ steps.deployment.outputs.page_url }}
73
+ runs-on : ubuntu-latest
74
+ steps :
74
75
- name : Deploy to GitHub Pages
75
- if : github.ref == 'refs/heads/master'
76
76
id : deployment
77
77
uses : actions/deploy-pages@v4
78
78
79
79
- name : Push site to gh-pages branch
80
- if : github.ref == 'refs/heads/master'
81
80
run : |
82
81
CINFO="$(git log -1 --pretty="%an: [%h] %s")"
83
82
git clone --depth=1 --branch=gh-pages --single-branch --no-checkout \
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments