-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.47 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
name: "Publish documentation"
on:
push:
branches:
- "master"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-documentation:
runs-on: self-hosted
steps:
- name: "Set up required tools"
run: |
sudo apt-get update
sudo apt-get install curl build-essential -y
- name: Checkout repository
uses: actions/[email protected]
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Build documentation
run: cargo doc --workspace --no-deps --all-features --document-private-items --verbose
- name: Prepare for deployment
run: |
echo "<meta http-equiv=\"refresh\" content=\"0; url=kolomoni\">" > ./target/doc/index.html
chmod --changes -R +rX "./target/doc"
- name: Upload pages artifact
uses: actions/[email protected]
with:
name: github-pages
path: ./target/doc
retention-days: 1
deploy-documentation:
runs-on: self-hosted
needs: build-documentation
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy documentation on GitHub Pages
uses: actions/deploy-pages@v4