Skip to content

Commit

Permalink
deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mimoo committed Nov 22, 2023
1 parent 2ec4415 commit 3d6d6fd
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Book

on:
push:
branches:
- "*"

env:
# This version has been chosen randomly. It seems that with 2023-11-16, it is
# broken. The compiler crashes. Feel free to pick any newer working version.
RUST_TOOLCHAIN_VERSION: "nightly-2023-10-10"

jobs:
release:
name: GitHub Pages
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/[email protected]

# as action-rs does not seem to be maintained anymore, building from
# scratch the environment using rustup
- name: Setup nightly Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf -o rustup-init \
https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
chmod +x ./rustup-init
./rustup-init -y --default-toolchain "$RUST_TOOLCHAIN_VERSION" --profile default
rm ./rustup-init
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# overwriting default rust-toolchain
echo $RUST_TOOLCHAIN_VERSION > rust-toolchain
- name: Build the mdbook
run: |
make deps
make build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/html

0 comments on commit 3d6d6fd

Please sign in to comment.