-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.3 KB
/
gh-pages.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
name: gh-pages
on:
push:
branches: [ main, jkrdev ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
docs-build-test-deploy:
name: Build, test and deploy docs
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pull-requests: write # To create a PR from that branch
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
# - uses: actions/setup-python@v5
# with:
# python-version: '3.12'
- name: Setup mdBook
uses: taiki-e/install-action@v2
with:
tool: mdbook,lychee
- name: build-docs
run: cd docs && mdbook build && lychee book
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: book
path: docs/book
- name: deploy-docs
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book