2019-12-30 08:55:40 +03:00
|
|
|
name: pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-10-02 15:26:22 +03:00
|
|
|
- main
|
2021-02-07 20:59:10 +03:00
|
|
|
paths:
|
2021-10-02 15:26:22 +03:00
|
|
|
- "docs/**"
|
|
|
|
- "ci/build-docs.sh"
|
|
|
|
- "ci/generate-docs.py"
|
|
|
|
- "ci/subst-release-info.py"
|
|
|
|
- ".github/workflows/pages.yml"
|
|
|
|
- ".github/ISSUE_TEMPLATE/*"
|
2019-12-30 09:22:14 +03:00
|
|
|
schedule:
|
|
|
|
- cron: "50 * * * *"
|
|
|
|
|
2019-12-30 08:55:40 +03:00
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-11 04:34:51 +03:00
|
|
|
uses: actions/checkout@v3
|
2019-12-30 08:55:40 +03:00
|
|
|
- name: Install Rust
|
|
|
|
run: |
|
|
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
rustup update stable
|
2022-05-07 06:04:11 +03:00
|
|
|
- uses: actions/cache@v3
|
2019-12-30 08:55:40 +03:00
|
|
|
with:
|
2022-05-07 06:04:11 +03:00
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
2022-05-07 06:19:14 +03:00
|
|
|
key: ${{ runner.os }}-cargo-mdbook-${{ hashFiles('.github/workflows/pages.yml') }}
|
2019-12-30 08:55:40 +03:00
|
|
|
- name: Install mdBook
|
|
|
|
run: |
|
2022-05-07 06:19:14 +03:00
|
|
|
(test -x ~/.cargo/bin/mdbook || (cd && cargo install mdbook --no-default-features --features search --vers "^0.4" --locked))
|
2022-05-07 06:04:11 +03:00
|
|
|
- name: Install mdBook linkcheck
|
|
|
|
run: |
|
2022-05-07 06:19:14 +03:00
|
|
|
(test -x ~/.cargo/bin/mdbook-linkcheck || (cd && cargo install mdbook-linkcheck --locked))
|
2022-05-07 06:04:11 +03:00
|
|
|
- name: Install mdBook mermaid
|
|
|
|
run: |
|
2022-05-07 06:19:14 +03:00
|
|
|
(test -x ~/.cargo/bin/mdbook-mermaid || (cd && cargo install mdbook-mermaid --locked))
|
2019-12-30 08:55:40 +03:00
|
|
|
- name: Build
|
2019-12-30 09:37:06 +03:00
|
|
|
run: |
|
|
|
|
source $HOME/.cargo/env
|
2020-05-04 02:28:12 +03:00
|
|
|
./ci/build-docs.sh
|
2019-12-30 08:55:40 +03:00
|
|
|
- name: Deploy
|
2021-12-12 09:33:46 +03:00
|
|
|
if: success()
|
2022-05-30 04:24:18 +03:00
|
|
|
uses: crazy-max/ghaction-github-pages@v3
|
2019-12-30 08:55:40 +03:00
|
|
|
with:
|
|
|
|
target_branch: gh-pages
|
2021-02-24 20:27:13 +03:00
|
|
|
build_dir: gh_pages/html
|
2020-12-10 09:47:57 +03:00
|
|
|
keep_history: true
|
|
|
|
allow_empty_commit: false
|
2019-12-30 08:55:40 +03:00
|
|
|
env:
|
2020-12-10 02:58:14 +03:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|