Skip to content

Commit

Permalink
Initial version of docs workflow
Browse files Browse the repository at this point in the history
Closes #36
  • Loading branch information
jeromekelleher committed Aug 22, 2023
1 parent 0b878f8 commit 74f459b
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 18 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Docs

on:
pull_request:
push:
branches: [main]
tags:
- '*'

env:
BUILD_GSL: true
COMMIT_EMAIL: [email protected]
OWNER: tskit-dev
REPO: tstrait

jobs:
build-deploy-docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: true

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- uses: actions/cache@v3
id: venv-cache
with:
path: venv
key: docs-venv-v8-${{ hashFiles('requirements/CI-docs/requirements.txt') }}

- name: Create venv and install deps
if: steps.venv-cache.outputs.cache-hit != 'true'
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -r requirements/CI-docs/requirements.txt
- name: Build Docs
run: |
. venv/bin/activate
cd docs
make
- name: Trigger docs 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"}'
28 changes: 10 additions & 18 deletions requirements/CI-docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
autodocsumm>=0.2.7
jsonschema>=3.0.0
jupyter-book>=0.12.1
matplotlib
msprime
numba
numpy
pandas
scipy
sphinx==4.5
sphinx-argparse
sphinx-autodoc-typehints>=1.18.3
sphinx-issues
sphinx-jupyterbook-latex
statsmodels
tskit
tskit-book-theme
pydata_sphinx_theme>=0.7.2
jupyter-book==0.15.1
matplotlib==3.7.2
msprime==1.2.0
numba==0.57.1
numpy==1.21.0 # for numba
pandas==2.0.3
scipy==1.11.1
sphinx-book-theme # not pinned to enable easy updates
sphinx-issues==3.0.1
tskit==0.5.5

0 comments on commit 74f459b

Please sign in to comment.