Skip to content

Deploy to GitHub Pages #1

Deploy to GitHub Pages

Deploy to GitHub Pages #1

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install mdbook
uses: baptiste0928/cargo-install@v3
with:
crate: mdbook
version: "0.4.40"
- name: Install mdbook-katex
uses: baptiste0928/cargo-install@v3
with:
crate: mdbook-katex
version: "0.9.0"
- name: Print mdbook and plugins version
run: |
mdbook --version
mdbook-katex --version
- run: mdbook build md
- name: Run Link Checker
uses: lycheeverse/lychee-action@v1
with:
args: --base book .
- name: Upload mdbook
uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/main'
with:
name: book
path: ./book
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs:
- build
steps:
- uses: actions/deploy-pages@v4
id: deployment