59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
name: Deploy
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
release:
|
|
name: Deploy Release
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
target:
|
|
- aarch64-unknown-linux-musl
|
|
- x86_64-unknown-linux-gnu
|
|
- x86_64-unknown-linux-musl
|
|
- x86_64-apple-darwin
|
|
- x86_64-pc-windows-msvc
|
|
include:
|
|
- target: aarch64-unknown-linux-musl
|
|
os: ubuntu-latest
|
|
- target: x86_64-unknown-linux-gnu
|
|
os: ubuntu-latest
|
|
- target: x86_64-unknown-linux-musl
|
|
os: ubuntu-latest
|
|
- target: x86_64-apple-darwin
|
|
os: macos-latest
|
|
- target: x86_64-pc-windows-msvc
|
|
os: 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 ${{ matrix.target }}
|
|
shell: bash
|
|
- name: Build and deploy artifacts
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: ci/make-release.sh ${{ matrix.os }} ${{ matrix.target }}
|
|
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
|
|
- name: Build book
|
|
run: cargo run -- build guide
|
|
- name: Deploy to GitHub
|
|
env:
|
|
GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }}
|
|
run: |
|
|
touch guide/book/.nojekyll
|
|
curl -LsSf https://raw.githubusercontent.com/rust-lang/simpleinfra/master/setup-deploy-keys/src/deploy.rs | rustc - -o /tmp/deploy
|
|
cd guide/book
|
|
/tmp/deploy
|