Skip to content

book

book #2

Workflow file for this run

name: book
# Build the English book with mdBook and deploy it to GitHub Pages.
# Requires Pages to be enabled with "GitHub Actions" as the source
# (Settings → Pages → Build and deployment → Source: GitHub Actions).
on:
push:
branches: [main]
paths:
- "book/**"
- ".github/workflows/book.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment; don't cancel an in-progress one.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.5.3
steps:
- uses: actions/checkout@v4
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 -LsSf \
"https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
| tar -xz -C "$RUNNER_TEMP"
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
- name: Build book
run: mdbook build book
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: book/book
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4