From 4da8940c16cf1023528546023cc12953a85c4e33 Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Fri, 23 Oct 2026 20:42:27 -0500 Subject: [PATCH 1/2] CI: Few more changes --- .github/workflows/pypi-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index f87c8ab..e6f93da 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 name: Install Python with: - python-version: 3.14 + python-version: 3.14.9 - name: Install dependencies run: | @@ -49,7 +49,7 @@ jobs: - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 name: Install Python with: - python-version: "3.x" + python-version: "3.14.9" - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: releases From 59bfa3a213c6d0c655d5b08b4b38da209e001c49 Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Fri, 23 Oct 2026 20:47:26 -0500 Subject: [PATCH 2/2] Refactor GitHub Actions for site deployment Updated the GitHub Actions workflow to include a new job for deploying the built site to GitHub Pages and adjusted permissions accordingly. --- .github/workflows/build-docs.yml | 52 ++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index afbd609..810056a 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -12,9 +12,12 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -# This job installs dependencies, build the website, and pushes it to `gh-pages` +permissions: + contents: read + jobs: - deploy-website: + # This job installs dependencies, builds the website, and uploads it as an artifact + build-site: runs-on: ubuntu-latest defaults: run: @@ -23,6 +26,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + # Install dependencies - name: Setup Conda Environment uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1 @@ -33,16 +37,46 @@ jobs: - name: Install PySP2 run: | pip install -e . --no-deps --force-reinstall + # Build the website - name: Build the site run: | cd docs make html - # Push the book's HTML to github-pages - - name: GitHub Pages action - uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 - if: github.ref == 'refs/heads/main' + + # Upload the built site so it can be used by the deploy job + - name: Upload site artifact + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: site-html + path: docs/build/html + + # This job downloads the built site and deploys it to GitHub Pages + deploy-site: + needs: build-site + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Download site artifact + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: site-html + path: docs/build/html + + - name: Setup Pages + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/build/html - cname: https://arm-doe.github.io/PySP2/ + path: docs/build/html + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1