-
Notifications
You must be signed in to change notification settings - Fork 16
53 lines (43 loc) · 1.3 KB
/
docs.yml
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
47
48
49
50
51
52
53
name: "Documentation"
on:
push:
branches:
- main # run for pushes to the main branch
workflow_dispatch:
env:
rust_release: nightly
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
permissions:
contents: write
jobs:
coverage:
name: "Generate Documentation"
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
- name: Get Sha
id: sha
run: |
echo -e "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT"
echo -e "sha=${{ github.sha }}"
- name: Install rust ${{ env.rust_release }}
run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }}
- name: Generate documentation
working-directory: .
run: |
./tools/gen_docs.sh
- name: Move all html to correct folders for deployment
run: |
mkdir deploy
cp -r target/doc/* deploy
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./deploy
target-folder: "docs"
branch: gh-pages
commit-message: "Actions: Documentation for ${{ steps.sha.outputs.result }}"