From 31b3c483da64b50c6498411588b88d1a981d646b Mon Sep 17 00:00:00 2001 From: Mario Geiger Date: Tue, 7 Jan 2025 13:22:05 +0100 Subject: [PATCH] CI: test doc in PR (#55) * rename workflow file to reflect documentation build and deployment; update Python version to 3.12 * add GitHub Actions workflow for building documentation with Sphinx * rename --- .github/workflows/doc_build.yml | 25 +++++++++++++++++++ .../{static.yml => doc_build_deploy.yml} | 7 +++--- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/doc_build.yml rename .github/workflows/{static.yml => doc_build_deploy.yml} (92%) diff --git a/.github/workflows/doc_build.yml b/.github/workflows/doc_build.yml new file mode 100644 index 0000000..5934052 --- /dev/null +++ b/.github/workflows/doc_build.yml @@ -0,0 +1,25 @@ +name: Build Documentation + +on: + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: "3.12" + - name: Build sphinx + run: | + python -m pip install --upgrade pip + python -m pip install pytest + python -m pip install ./cuequivariance + python -m pip install ./cuequivariance_jax + python -m pip install ./cuequivariance_torch + pip install -r docs/requirements.txt + sphinx-build -b html docs docs/public diff --git a/.github/workflows/static.yml b/.github/workflows/doc_build_deploy.yml similarity index 92% rename from .github/workflows/static.yml rename to .github/workflows/doc_build_deploy.yml index bb68f66..63a071e 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/doc_build_deploy.yml @@ -1,4 +1,4 @@ -name: Build Documentation +name: Build Documentation and Deploy on: # Runs on pushes targeting the default branch @@ -21,8 +21,7 @@ concurrency: cancel-in-progress: false jobs: - # Single deploy job since we're just deploying - deploy: + build_deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -35,7 +34,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: "3.11" + python-version: "3.12" - name: Build sphinx run: | python -m pip install --upgrade pip