Files
LLeMbas-TTY/.github/workflows/pages.yml
T
Wez Furlong 9a610358d1 docs: upgrade to mdbook 0.4, enable link checking
Standardize on `thing.md` rather than `thing.markdown` to make it
easier to cross link.
2021-01-30 14:14:29 -08:00

46 lines
1.3 KiB
YAML

name: pages
on:
push:
branches:
- master
schedule:
- cron: "50 * * * *"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
source $HOME/.cargo/env
rustup update stable
- name: Cache mdBook
uses: actions/cache@v1
with:
path: ~/mdbook-bin
key: cargo-bin-mdbook-1
- name: Install mdBook
run: |
mkdir -p ~/mdbook-bin
(test -x ~/mdbook-bin/mdbook || (cd && cargo install --vers "^0.4" mdbook && cp -p ~/.cargo/bin/mdbook ~/mdbook-bin))
(test -x ~/mdbook-bin/mdbook-linkcheck || (cd && cargo install mdbook-linkcheck && cp -p ~/.cargo/bin/mdbook-linkcheck ~/mdbook-bin))
- name: Build
run: |
source $HOME/.cargo/env
PATH="$HOME/mdbook-bin:$PATH"
./ci/build-docs.sh
- name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: gh_pages/html
keep_history: true
allow_empty_commit: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}