-
Notifications
You must be signed in to change notification settings - Fork 16
66 lines (56 loc) · 1.93 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
54
55
56
57
58
59
60
61
62
63
64
65
66
name: "Documentation (Generate)"
on:
push:
branches:
- main # run for pushes to the main branch
workflow_dispatch:
jobs:
coverage:
name: "Generate Documentation"
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Generate caching variables
id: cache-vars
run: |
echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT"
echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)"
- name: Get Sha
id: sha
run: |
if [[ ${{ github.event_name }} == 'pull_request' ]]
then
echo -e "sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT"
echo -e "sha=${{ github.event.pull_request.head.sha }}"
else
echo -e "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT"
echo -e "sha=${{ github.sha }}"
fi
- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index
~/.cargo/git/
target/
solvers/minion/vendor
solvers/chuffed/vendor
key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: stable-${{ runner.os }}-gitmodules-
- name: Install rust stable
run: rustup update stable && rustup default stable
- name: Generate documentation
working-directory: .
run: |
./etc/scripts/gen_docs.sh
- name: Move all html to correct folders for deployment
run: |
mkdir deploy
cp -r target/doc/* deploy
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: docs-${{ steps.sha.outputs.sha }}
path: deploy/**