-
Notifications
You must be signed in to change notification settings - Fork 244
37 lines (35 loc) · 1.09 KB
/
api-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
on:
push:
branches:
- main
name: API Docs
jobs:
publish:
name: Build and publish
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up cargo
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cargo Cache
uses: Swatinem/rust-cache@v2
- name: Build docs
run: |
cargo doc --all --features cross-platform-docs --no-deps --document-private-items
- name: Prepare docs for publication
run: |
mkdir -p publish
mv target/doc publish/main
echo '<!doctype html><a href="volta">volta</a>' > publish/main/index.html
echo '<!doctype html><a href="main">main</a>' > publish/index.html
- name: Publish docs to GitHub pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
COMMIT_MESSAGE: Publishing GitHub Pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: publish
SINGLE_COMMIT: true