From 5ac066a7fdc56c7234b05ad9ab8a44f8f53b79ba Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 17 Jan 2023 14:38:49 +0000 Subject: [PATCH] CI: deploy interchange protocol docs on each commit to main --- .github/workflows/protocol_docs.yml | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/protocol_docs.yml diff --git a/.github/workflows/protocol_docs.yml b/.github/workflows/protocol_docs.yml new file mode 100644 index 00000000..007397b2 --- /dev/null +++ b/.github/workflows/protocol_docs.yml @@ -0,0 +1,43 @@ +name: Deploy protocol docs + +on: + push: + branches: + - main + +jobs: + publish: + name: 'Publish' + runs-on: ubuntu-latest + # Avoid running this workflow for forks: + if: "github.repository == 'data-apis/dataframe-api'" + steps: + - name: 'Checkout repository' + uses: actions/checkout@v3 + + - name: 'Install Python' + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: 'Install dependencies' + run: pip install -r ./requirements.txt + + - name: 'Build documentation' + run: | + # Turn warnings into errors and ensure .doctrees is not deployed: + mkdir site + sphinx-build -b html -WT --keep-going protocol/ site/latest -d doctrees + touch site/.nojekyll + + + - name: 'Deploy' + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + personal_token: ${{ secrets.ACTIONS_DEPLOY_TOKEN }} + external_repository: data-apis/dataframe-protocol + publish_branch: main + publish_dir: ./site + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com'