File tree Expand file tree Collapse file tree 1 file changed +47
-14
lines changed Expand file tree Collapse file tree 1 file changed +47
-14
lines changed Original file line number Diff line number Diff line change 1
- name : GitHub Pages
1
+ # Based on starter workflow
2
+ # https://github.com/actions/starter-workflows/blob/8217436fdee2338da2d6fd02b7c9fcff634c40e7/pages/static.yml
3
+ #
4
+ # Simple workflow for deploying static content to GitHub Pages
5
+ name : " GitHub Pages"
2
6
3
7
on :
8
+ # Runs on pushes targeting the default branch
4
9
push :
5
10
branches :
6
11
- master
7
12
13
+ # Allows you to run this workflow manually from the Actions tab
14
+ workflow_dispatch :
15
+
16
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17
+ permissions :
18
+ contents : read
19
+ pages : write
20
+ id-token : write
21
+
22
+ # Allow one concurrent deployment
23
+ concurrency :
24
+ group : " pages"
25
+ cancel-in-progress : true
26
+
8
27
jobs :
9
- pages :
10
- runs-on : ubuntu-22.04
28
+ # Single deploy job since we're just deploying
29
+ deploy :
30
+ environment :
31
+ name : github-pages
32
+ url : ${{ steps.deployment.outputs.page_url }}
33
+ runs-on : ubuntu-latest
11
34
steps :
12
- - uses : actions/checkout@v2
13
- - uses : actions-rs/cargo@v1
14
- with :
15
- command : doc
16
- args : --no-deps
17
- - name : Deploy GitHub Pages
18
- uses : peaceiris/actions-gh-pages@v3
19
- with :
20
- github_token : ${{ secrets.GITHUB_TOKEN }}
21
- publish_dir : ./target/doc
22
- force_orphan : true
35
+ - name : Checkout
36
+ uses : actions/checkout@v3
37
+
38
+ # Generate cargo-doc
39
+ - uses : actions-rs/cargo@v1
40
+ with :
41
+ command : doc
42
+ args : --no-deps
43
+
44
+ - name : Setup Pages
45
+ uses : actions/configure-pages@v2
46
+
47
+ # Upload target/doc directory
48
+ - name : Upload artifact
49
+ uses : actions/upload-pages-artifact@v1
50
+ with :
51
+ path : ' target/doc'
52
+
53
+ - name : Deploy to GitHub Pages
54
+ id : deployment
55
+ uses : actions/deploy-pages@v1
You can’t perform that action at this time.
0 commit comments