-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.01 KB
/
deploy-gh-pages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Deploy Github Pages
on:
push:
branches: [master]
workflow_dispatch:
jobs:
generate:
name: Generate cargo docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install toolchain
uses: ./.github/actions/rust-toolchain
- name: Generate Documentation
run: |
cargo doc --no-deps --document-private-items
echo "<meta http-equiv=\"refresh\" content=\"0; url=neotest\">" > target/doc/index.html
cp -r target/doc ./docs
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./target/doc
deploy:
name: Deploy to GH Pages
runs-on: ubuntu-latest
needs: generate
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Upload GH Pages
id: deployment
uses: actions/deploy-pages@v1