From 8181c8b81fed4c4b527ae341514887ef857256cc Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Tue, 8 Jul 2025 15:07:30 +0100 Subject: [PATCH 1/3] Update Python version used in docs workflow --- .github/workflows/docs.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 583486cd..0288b1c0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,18 +9,17 @@ jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.9] steps: - name: Checkout Source uses: actions/checkout@v4.2.2 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: 3.x + cache: pip + cache-dependency-path: pyproject.toml - name: Install dependencies run: | From bdd5773e40fcd2603ad741da7fd746d8000a19f5 Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Tue, 8 Jul 2025 16:45:02 +0100 Subject: [PATCH 2/3] Trigger docs workflow on pull-requests --- .github/workflows/docs.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0288b1c0..f7db7773 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,10 +1,23 @@ name: Docs on: + pull_request: + branches: + - main + paths: + - .github/workflows/docs.yml + - pyproject.toml + - s2fft/** + - docs/** + - notebooks/** push: branches: - main - + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: build: From 87352ea2fd5c4e193d36ead3571048029e502f3c Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Tue, 8 Jul 2025 16:47:39 +0100 Subject: [PATCH 3/3] Deploy only on push to main --- .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 f7db7773..a9cfd62d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -45,7 +45,7 @@ jobs: cd docs && make html - name: Deploy - if: github.ref == 'refs/heads/main' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: JamesIves/github-pages-deploy-action@v4.7.3 with: branch: gh-pages # The branch the action should deploy to.