mdBook/.github/workflows/deploy.yml

43 lines
1.2 KiB
YAML
Raw Normal View History

2019-10-20 21:44:28 +00:00
name: Deploy
on:
release:
types: [created]
jobs:
release:
name: Deploy Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@master
- name: Install hub
run: ci/install-hub.sh ${{ matrix.os }}
shell: bash
- name: Install Rust
run: ci/install-rust.sh stable
shell: bash
- name: Build and deploy artifacts
2019-10-21 20:41:06 +00:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2019-10-20 21:44:28 +00:00
run: ci/make-release.sh ${{ matrix.os }}
shell: bash
pages:
name: GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust (rustup)
run: rustup update stable --no-self-update && rustup default stable
2019-10-21 20:41:06 +00:00
- name: Build book
run: cargo run -- build guide
2019-10-21 20:41:06 +00:00
- name: Deploy to GitHub
env:
GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }}
run: |
touch guide/book/.nojekyll
2019-10-21 20:41:06 +00:00
curl -LsSf https://raw.githubusercontent.com/rust-lang/simpleinfra/master/setup-deploy-keys/src/deploy.rs | rustc - -o /tmp/deploy
cd guide/book
2019-10-21 20:41:06 +00:00
/tmp/deploy