2019-12-30 08:55:40 +03:00
|
|
|
name: pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
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
|
|
|
|
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
|
2019-12-30 09:35:13 +03:00
|
|
|
- name: Cache mdBook
|
2019-12-30 08:55:40 +03:00
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
2019-12-31 02:12:51 +03:00
|
|
|
path: ~/mdbook-bin
|
2019-12-30 09:35:13 +03:00
|
|
|
key: cargo-bin-mdbook
|
2019-12-30 08:55:40 +03:00
|
|
|
- name: Install mdBook
|
|
|
|
run: |
|
2019-12-31 02:12:51 +03:00
|
|
|
mkdir -p ~/mdbook-bin
|
|
|
|
(test -x ~/mdbook-bin/mdbook || (cd && cargo install --vers "^0.3" mdbook && cp -p ~/.cargo/bin/mdbook ~/mdbook-bin))
|
2019-12-30 08:55:40 +03:00
|
|
|
- name: Build
|
2019-12-30 09:37:06 +03:00
|
|
|
run: |
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
curl https://api.github.com/repos/wez/wezterm/releases > /tmp/wezterm.releases.json
|
|
|
|
python3 ci/subst-release-info.py
|
2019-12-31 02:12:51 +03:00
|
|
|
~/mdbook-bin/mdbook build docs
|
2019-12-30 08:55:40 +03:00
|
|
|
- name: Deploy
|
|
|
|
if: success()
|
|
|
|
uses: crazy-max/ghaction-github-pages@v1
|
|
|
|
with:
|
|
|
|
target_branch: gh-pages
|
|
|
|
build_dir: gh_pages
|
|
|
|
env:
|
|
|
|
GITHUB_PAT: ${{ secrets.GH_PAT }}
|