From 6481af39b651e00c439a92dd9102ec14d8e31a92 Mon Sep 17 00:00:00 2001 From: Ben Jeffery Date: Wed, 8 Nov 2023 22:53:51 +0000 Subject: [PATCH] Add docs to CI --- .github/workflows/docs.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..2fc50da --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Build Docs + +on: + pull_request: + push: + branches: [main] + tags: + - '*' + +jobs: + build-deploy-docs: + name: Docs + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: 'pip' + cache-dependency-path: requirements/CI-docs.txt + + - name: Create venv and install deps + run: | + pip install --upgrade pip wheel + pip install -r requirements/CI-docs.txt + + - name: Build Docs + run: | + make -C docs + + - 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"}' \ No newline at end of file