Skip to content

Docs collapsable menu (#479) #9

Docs collapsable menu (#479)

Docs collapsable menu (#479) #9

Workflow file for this run

name: Pages
on:
push:
branches: [main]
workflow_dispatch:
# Default to read-only; the deploy job opts into the scopes it needs.
permissions: {}
concurrency:
group: pages
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
ZOLA_VERSION: "0.22.1"
jobs:
build:
name: Build site
runs-on: ubuntu-latest
# Read-only: checks out the repo and uploads the rendered site as an artifact.
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Toolchain
run: rustup toolchain install
- name: Cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Zola
run: |
curl -fsSL "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
| sudo tar -xz -C /usr/local/bin
- name: Transform docs
run: cargo run --locked -p obsidian-to-zola --release -- --strict
- name: Zola build
run: zola --root site build
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site/public
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write # publish the built site artifact to GitHub Pages
id-token: write # mint the OIDC token actions/deploy-pages requires
steps:
- id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0