Skip to content

Bump AlexanderDokuchaev/md-dead-link-check from 1.2.0 to 1.3.0 #79

Bump AlexanderDokuchaev/md-dead-link-check from 1.2.0 to 1.3.0

Bump AlexanderDokuchaev/md-dead-link-check from 1.2.0 to 1.3.0 #79

Workflow file for this run

name: Build and Deploy Docs
on:
push:
branches:
- master
pull_request:
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
# Use MDBOOK_VERSION environment variable for better control
- name: Set mdbook version
run: echo "MDBOOK_VERSION=0.5.1" >> $GITHUB_ENV
# Directly download prebuilt binaries instead of using cargo install
- name: Install mdBook
run: |
mkdir -p $HOME/.local/bin
curl -sSL 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 $HOME/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
# Cache the mdbook plugins to avoid rebuilding
- name: Cache mdbook plugins
uses: actions/cache@v4
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-mdbook-plugins-${{ hashFiles('**/book.toml') }}
# Install plugins only if not in cache
- name: Install mdbook plugins
run: |
if ! command -v mdbook-mermaid &> /dev/null; then
cargo install mdbook-mermaid --version 0.17.0
fi
if ! command -v mdbook-langtabs &> /dev/null; then
cargo install mdbook-langtabs --version 0.2.0
fi
# Setup and build
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Build documentation
run: |
mdbook --version
mdbook build
touch ./book/.nojekyll
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: "book"
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
id: github-deployment
uses: actions/deploy-pages@v4
- name: Deploy to Cloudflare Pages
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
id: cloudflare-deployment
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy book/ --project-name=styxbook --branch=main