GitHub Viewer
# Reusable workflow for building docs in a tskit-dev package repo.
#
# Called from each package's own .github/workflows/docs.yml on push/PR.
# Checks out the current repo, delegates the build to the build-docs
# composite action, and triggers a tskit-site rebuild on merge to main.
#
# Requirements: see .github/actions/build-docs/action.yml
name: Documentation workflow for tskit-dev
on:
workflow_call:
inputs:
pyproject-directory:
description: 'Directory containing pyproject.toml (relative to repo root)'
required: false
type: string
default: '.'
additional-apt-packages:
description: 'Additional APT packages to install'
required: false
type: string
default: ''
install-slim:
description: 'Whether to install SLiM'
required: false
type: boolean
default: false
install-slim-branch:
description: 'Name of github branch to install SLiM from (if not specified, use conda)'
required: false
type: string
default: ''
install-playwright:
description: 'Install Playwright (chromium) for docs that render browser screenshots'
required: false
type: boolean
default: false
permissions:
contents: read
jobs:
Docs:
name: Build docs
runs-on: ubuntu-24.04
steps:
- uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
fetch-depth: 0
persist-credentials: false
- uses: $/.github/actions/build-docs
with:
pyproject-directory: ${{ inputs.pyproject-directory }}
additional-apt-packages: ${{ inputs.additional-apt-packages }}
install-slim: ${{ inputs.install-slim }}
install-slim-branch: ${{ inputs.install-slim-branch }}
install-playwright: ${{ inputs.install-playwright }}
- name: Trigger tskit-site rebuild
if: github.ref == 'refs/heads/main'
run: |
curl -X POST https://api.github.com/repos/tskit-dev/tskit-site/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u AdminBot-tskit:${{ secrets.ADMINBOT_TOKEN }} \
--data '{"event_type":"build-docs"}'