Documentation, formatting #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Workflow for building and deploying mdbook-utils | |
## | |
## 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: | |
on: | |
## Runs on pushes targeting the default branch | |
push: | |
branches: ["main"] | |
## Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
## 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 | |
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- | |
## Rust | |
- name: Build docker image | |
run: docker compose -f .devcontainer/compose.yaml -f .devcontainer/compose-ci.yaml build | |
- name: Build the code | |
run: docker compose -f .devcontainer/compose.yaml -f .devcontainer/compose-ci.yaml run mdbook-utils |