Skip to content

Enforce the writing style on the codebase #160

Enforce the writing style on the codebase

Enforce the writing style on the codebase #160

Workflow file for this run

name: Publish Docs (MkDocs Plus Playground)
on:
workflow_dispatch:
push:
branches:
- main
- develop
tags:
- "v*"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install a stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
- name: Add the wasm target to the pinned toolchain
run: rustup target add wasm32-unknown-unknown
- name: Install the matching wasm-bindgen CLI
run: |
VERSION=$(cargo metadata --format-version 1 | python3 -c \
"import sys,json; print(next(p['version'] for p in json.load(sys.stdin)['packages'] if p['name']=='wasm-bindgen'))")
echo "Installing wasm-bindgen-cli $VERSION"
cargo +stable install --locked wasm-bindgen-cli --version "$VERSION"
- name: Stamp the playground build
run: echo "ISSUNDB_BUILD_REF=${GITHUB_REF_NAME}@${GITHUB_SHA:0:5}" >> "$GITHUB_ENV"
- name: Check the playground demo catalog
run: make playground-check
- name: Build the playground module
run: make playground-build
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: uv sync --extra dev
- name: Build IssunDB docs
run: uv run mkdocs build
- name: Add the playground to the site
run: |
mkdir -p site/playground
cp -r web/. site/playground/
rm -f site/playground/README.md
du -sh site/playground
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site
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