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: Flatten so the crate sits at the channel root run: bash scripts/flatten-docs.sh - 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