Skip to content

first commit

first commit #1

Workflow file for this run

name: deploy
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
env:
# renovate: rust-lang/mdBook
MDBOOK_VERSION: '0.4.40'
# renovate: slowsage/mdbook-pagetoc
MDBOOK_PAGETOC_VERSION: '0.2.0'
# renovate: lambdalisue/rs-mdbook-alerts
MDBOOK_ALERTS_VERSION: '0.5.2'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install mdbook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: ${{ env.MDBOOK_VERSION }}
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "mdbook-template/gh-actions-cache"
- name: Install mdbook plugins
run: |
cargo install mdbook-pagetoc --version ${{ env.MDBOOK_PAGETOC_VERSION }}
cargo install mdbook-alerts --version ${{ env.MDBOOK_ALERTS_VERSION }}
- name: Build with mdbook
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build
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