File tree Expand file tree Collapse file tree 1 file changed +37
-15
lines changed Expand file tree Collapse file tree 1 file changed +37
-15
lines changed Original file line number Diff line number Diff line change 1
1
name : Deploy MkDocs to GitHub Pages
2
2
3
+ permissions :
4
+ contents : read
5
+ pages : write
6
+ id-token : write
7
+
3
8
on :
4
9
push :
5
- branches : [ main ]
10
+ branches :
11
+ - ' main'
12
+ pull_request :
13
+ branches :
14
+ - ' main'
6
15
7
16
jobs :
8
- deploy :
17
+ build :
9
18
runs-on : ubuntu-latest
10
-
11
19
steps :
12
- - uses : actions/checkout@v4
13
-
14
- - uses : actions/setup-python@v4
20
+ - name : Checkout
21
+ uses : actions/checkout@v4
22
+ - name : Setup Pages
23
+ uses : actions/configure-pages@v5
24
+ - name : Install Python
25
+ uses : actions/setup-python@v4
15
26
with :
16
27
python-version : ' 3.13'
17
28
cache : ' pip'
18
-
19
- - run : pip install -r requirements.txt
20
-
21
- - run : mkdocs build
22
-
23
- - uses : peaceiris/actions-gh-pages@v3
29
+ - name : Install Python Dependencies
30
+ run : pip install -r requirements.txt
31
+ - name : build site
32
+ run : |
33
+ mkdocs build
34
+ echo -n '' > site/.nojekyll
35
+ echo -n 'oss.hust.openatom.club' > site/CNAME
36
+ - name : Upload artifact
37
+ uses : actions/upload-pages-artifact@v3
24
38
with :
25
- github_token : ${{ secrets.GITHUB_TOKEN }}
26
- publish_dir : ./site
27
- cname : oss.hust.openatom.club
39
+ path : ' ./site'
28
40
41
+ deploy :
42
+ runs-on : ubuntu-latest
43
+ needs : build
44
+ environment :
45
+ name : github-pages
46
+ url : oss.hust.openatom.club
47
+ steps :
48
+ - name : Deploy to GitHub Pages
49
+ id : deployment
50
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments