Skip to content

Update to rust 1.81 and mdbook 0.4.40; update dependencies; formatting #214

Update to rust 1.81 and mdbook 0.4.40; update dependencies; formatting

Update to rust 1.81 and mdbook 0.4.40; update dependencies; formatting #214

Workflow file for this run

## Workflow for building and deploying a mdBook site to GitHub Pages
##
## To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
## See also https://ectobit.com/blog/speed-up-github-actions-rust-pipelines/
##
name: Deploy mdBook site to GitHub Pages
on:
## Runs on pushes targeting the default branch
push:
branches: ["main"]
## Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
deploy_to_gh_pages:
description: 'If true, deploy the book to GitHub Pages'
type: boolean
required: true
default: false
## Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
## Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
## However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# Default to bash
defaults:
run:
shell: bash
jobs:
## Build job
build:
runs-on: ubuntu-latest
steps:
- name: Basic information
run: echo "The job was automatically triggered by a ${{ github.event_name }} event from @${{ github.actor }}. The OS is ${{ runner.os }}"
- name: Code checkout
uses: actions/checkout@v4
## Use the following in conjunction with cache_from/to type=local in compose-ci.yaml if type=gha caching does not work
## See also https://doc.rust-lang.org/cargo/guide/cargo-home.html?highlight=crate%20cache#caching-the-cargo-home-in-ci
# - name: Set up cargo cache
# uses: actions/cache@v3
# continue-on-error: false
# with:
# path: |
# ./.cache/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: ${{ runner.os }}-cargo-
- name: Build docker image
run: docker compose -f .devcontainer/compose.yaml -f .devcontainer/compose-ci.yaml build
- name: Create book/ directory
run: mkdir book/
- name: Build the book
run: docker compose -f .devcontainer/compose.yaml -f .devcontainer/compose-ci.yaml run book
- name: Setup GitHub Pages
id: pages
uses: actions/configure-pages@v4
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
path: ./book/html/
## Deployment job
deploy:
name: Deploy to GitHub Pages
if: ${{ inputs.deploy_to_gh_pages == 'true' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4