From f5876fc53d68196c1d2f0e6837cbcb5d23e35ddc Mon Sep 17 00:00:00 2001 From: Hyun Lee Date: Fri, 10 Jul 2026 19:06:40 -0600 Subject: [PATCH 1/4] Refactor docs.yml for improved CI/CD process Updated GitHub Actions workflow for documentation build and deployment. --- .github/workflows/docs.yml | 46 +++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a3d61314..77bc4986 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,41 +2,65 @@ name: Docs on: push: - branches: ["main"] + branches: + - main + pull_request: - branches: ["main"] + branches: + - main + + workflow_dispatch: permissions: contents: read - pages: write - id-token: write + +concurrency: + group: github-pages + cancel-in-progress: false jobs: build: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v8 with: enable-cache: true python-version: "3.14t" + - name: Install dependencies run: uv sync --frozen --group docs - - name: Build docs - run: uv run sphinx-build docs/source docs/_build/html - - name: Upload pages artifact - uses: actions/upload-pages-artifact@v3 + + - name: Build documentation + run: uv run sphinx-build -W docs/source docs/_build/html + + - name: Upload Pages artifact + if: github.event_name != 'pull_request' + uses: actions/upload-pages-artifact@v4 with: path: docs/_build/html deploy: + if: github.event_name != 'pull_request' needs: build runs-on: ubuntu-latest + + permissions: + pages: write + id-token: write + environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} + steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v5 From 119ba9cc71472573d458d2d22db74d773acca77a Mon Sep 17 00:00:00 2001 From: Hyun Lee Date: Fri, 10 Jul 2026 19:11:01 -0600 Subject: [PATCH 2/4] Update uv setup action to version 8.3.2 --- .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 77bc4986..1855f37f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: uses: actions/configure-pages@v5 - name: Install uv - uses: astral-sh/setup-uv@v8 + uses: astral-sh/setup-uv@v8.3.2 with: enable-cache: true python-version: "3.14t" From 91a94f44b767af33ce252f42538c816becbbe1cd Mon Sep 17 00:00:00 2001 From: Hyun Lee Date: Fri, 10 Jul 2026 19:15:54 -0600 Subject: [PATCH 3/4] Update html_static_path to be an empty list Changed html_static_path from a list containing '_static' to an empty list. --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 09546cba..14308680 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -50,4 +50,4 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +html_static_path = [] From cf19a51388b72e4766084c3c89fba43f45df4816 Mon Sep 17 00:00:00 2001 From: Hyun Lee Date: Fri, 10 Jul 2026 19:24:52 -0600 Subject: [PATCH 4/4] Modify GitHub Actions workflow for docs deployment Updated GitHub Actions workflow to enable cancellation of in-progress jobs and modified deployment conditions for pull requests. --- .github/workflows/docs.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1855f37f..3797eb9d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ permissions: concurrency: group: github-pages - cancel-in-progress: false + cancel-in-progress: true jobs: build: @@ -42,16 +42,20 @@ jobs: run: uv run sphinx-build -W docs/source docs/_build/html - name: Upload Pages artifact - if: github.event_name != 'pull_request' uses: actions/upload-pages-artifact@v4 with: path: docs/_build/html deploy: - if: github.event_name != 'pull_request' needs: build runs-on: ubuntu-latest + # Deploy pushes, manual runs, and PRs created from branches in this repository. + # Do not deploy untrusted pull requests from forks. + if: > + github.event_name != 'pull_request' || + github.event.pull_request.head.repo.full_name == github.repository + permissions: pages: write id-token: write @@ -63,4 +67,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v5 + uses: actions/deploy-pages@v4