1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-30 17:11:55 +03:00
wezterm/.github/workflows/pages.yml

44 lines
1.2 KiB
YAML
Raw Normal View History

name: pages
on:
push:
branches:
- master
2019-12-30 09:22:14 +03:00
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
2019-12-30 09:35:13 +03:00
- name: Cache mdBook
uses: actions/cache@v1
with:
path: ~/mdbook-bin
2019-12-30 09:35:13 +03:00
key: cargo-bin-mdbook
- name: Install mdBook
run: |
mkdir -p ~/mdbook-bin
(test -x ~/mdbook-bin/mdbook || (cd && cargo install --vers "^0.3" mdbook && cp -p ~/.cargo/bin/mdbook ~/mdbook-bin))
- name: Build
run: |
source $HOME/.cargo/env
curl https://api.github.com/repos/wez/wezterm/releases > /tmp/wezterm.releases.json
python3 ci/subst-release-info.py
~/mdbook-bin/mdbook build docs
- 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 }}