From 4336bebb8c0078a2af1d1cb3443d4b622f41190c Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Fri, 23 Oct 2026 17:05:43 -0500 Subject: [PATCH 1/6] Enhance GitHub Actions workflow for documentation Updated workflow to include pull request triggers, changed Python version, and modified deployment steps. --- .github/workflows/docs.yml | 55 +++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3b8dbd9..6990c6a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,17 +3,30 @@ name: Deploy Docs on: push: branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +concurrency: + group: "pages-${{ github.ref }}" + cancel-in-progress: true jobs: - docs: + build: runs-on: ubuntu-latest # Forks carry no release tags, so setuptools_scm cannot resolve a version - # here — and a fork has no business publishing to its own gh-pages. + # here. PR builds still run (for debugging) but only against this repo. if: github.repository == 'ARM-DOE/Adapt' - permissions: - contents: write steps: + - name: Check runner Node.js version + run: node --version + # Diagnostic only — confirms which patched Node 20.x binary + # (e.g. relevant to CVE fixes in 22.23.4 / 24.22.1 / 26.12.1 lines) + # is bundled in the current runner image. GitHub-authored actions + # below run on this same runtime; it cannot be pinned from here. - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -22,7 +35,7 @@ jobs: - name: Set up Python uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: - python-version: "3.13.17" + python-version: "3.14.9" cache: "pip" - name: Fetch all history for all tags and branches @@ -37,10 +50,32 @@ jobs: pip install --no-deps -e . - name: Build HTML docs - run: sphinx-build -b html docs docs/_build/html + run: sphinx-build -b html docs docs/_build/html -W --keep-going + # -W turns warnings into errors so broken refs/syntax fail the PR check + # --keep-going shows all warnings at once instead of stopping at the first - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 + - name: Setup Pages + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + + - name: Upload artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/_build/html + path: docs/_build/html + + deploy: + # Only deploy on pushes to main, never on PRs (including PRs from forks) + if: github.repository == 'ARM-DOE/Adapt' && github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 5819b9bc04af0dc14c313a83ad2747f8833ac6a5 Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Fri, 23 Oct 2026 17:19:04 -0500 Subject: [PATCH 2/6] Update GitHub Pages action to version 5.0.1 --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6990c6a..f73cd5b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -78,4 +78,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 From e26d7304050716f323761124329b8c93ca874f19 Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Fri, 23 Oct 2026 17:43:17 -0500 Subject: [PATCH 3/6] Enhance dependency installation in docs workflow Add conditional installation for project dependencies based on the presence of requirements.txt. --- .github/workflows/docs.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f73cd5b..2a9fc81 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,6 +44,14 @@ jobs: - name: Install doc dependencies run: | + + if [ -f requirements.txt ]; then + echo "Found requirements.txt — installing project dependencies" + pip install -r requirements.txt + else + echo "No requirements.txt found, skipping" + fi + python -m pip install --upgrade "pip>=26.2.2" "certifi>=2026.10.19" pip install sphinx>=7.0 pydata-sphinx-theme>=0.15 \ sphinx-autodoc-typehints myst-parser>=2.0 From 28f638630bf449de68caf86ad138137caab018d2 Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Fri, 23 Oct 2026 17:50:08 -0500 Subject: [PATCH 4/6] Update sphinx-build command in docs workflow Removed the '-W' option from the sphinx-build command to prevent warnings from being treated as errors. --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2a9fc81..9d90e17 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -58,7 +58,7 @@ jobs: pip install --no-deps -e . - name: Build HTML docs - run: sphinx-build -b html docs docs/_build/html -W --keep-going + run: sphinx-build -b html docs docs/_build/html --keep-going # -W turns warnings into errors so broken refs/syntax fail the PR check # --keep-going shows all warnings at once instead of stopping at the first From 63702e0488413e5dcb66926648347d78b1f37096 Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Fri, 23 Oct 2026 17:54:05 -0500 Subject: [PATCH 5/6] Fix duplicate pip install in docs workflow Removed duplicate pip install command for dependencies. --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9d90e17..2ba0d74 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,7 +44,8 @@ jobs: - name: Install doc dependencies run: | - + python -m pip install --upgrade "pip>=26.2.2" "certifi>=2026.10.19 + if [ -f requirements.txt ]; then echo "Found requirements.txt — installing project dependencies" pip install -r requirements.txt @@ -52,7 +53,6 @@ jobs: echo "No requirements.txt found, skipping" fi - python -m pip install --upgrade "pip>=26.2.2" "certifi>=2026.10.19" pip install sphinx>=7.0 pydata-sphinx-theme>=0.15 \ sphinx-autodoc-typehints myst-parser>=2.0 pip install --no-deps -e . From defa1a28434f6028b78a46081576230ad855fd77 Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Fri, 23 Oct 2026 18:03:38 -0500 Subject: [PATCH 6/6] Correct pip install command formatting Fix formatting issue in docs.yml for pip install command. --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2ba0d74..4768664 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,7 +44,7 @@ jobs: - name: Install doc dependencies run: | - python -m pip install --upgrade "pip>=26.2.2" "certifi>=2026.10.19 + python -m pip install --upgrade "pip>=26.2.2" "certifi>=2026.10.19" if [ -f requirements.txt ]; then echo "Found requirements.txt — installing project dependencies"