Files
coursebank/.gitea/workflows/docs.yml
T
alexm 32e1dc1101
Sync README to GitHub / sync (push) Successful in 12s
CI / check (push) Failing after 25s
Deploy docs / deploy (push) Canceled after 4m26s
Nightly / nightly (push) Canceled after 16s
fix: don't flatten docs
2026-08-07 23:31:35 -04:00

42 lines
1.1 KiB
YAML

name: Deploy docs
on:
push:
branches: [main]
tags: ['*.*.*']
workflow_dispatch:
env:
SITE_SLUG: coursebank
CRATE: coursebank
jobs:
deploy:
runs-on: pixi-build-rust
env:
CARGO_TARGET_DIR: /opt/cargo-target/${{ gitea.repository }}
steps:
- uses: actions/checkout@v4
- name: Build the API docs
env:
RUSTDOCFLAGS: "--html-before-content ${{ gitea.workspace }}/scripts/docs-banner.html"
run: |
pixi install --locked
pixi run doc-build
- name: Redirect the channel root to the crate page
run: |
printf '%s\n' "<!doctype html><meta http-equiv=\"refresh\" content=\"0; url=${CRATE}/\">" > target/doc/index.html
- name: Publish the channel to /srv/www
run: |
case "${{ gitea.ref }}" in
refs/tags/*) channel=release ;;
*) channel=nightly ;;
esac
bash scripts/publish-docs.sh "$channel"
- name: Point the site root at the latest release, else nightly
run: bash scripts/redirect-docs.sh