Skip to content

Update mdbook (#114) #34

Update mdbook (#114)

Update mdbook (#114) #34

name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 🐰
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Node Modules 💾
run: npm ci
- name: Set up mdBook 📚
uses: ./.github/workflows/common/set-up-mdbook
with:
token: ${{secrets.GITHUB_TOKEN}}
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build with mdBook
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./book
# Deployment job
deploy:
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