From 2878fbc62f2039a3532fe1a75e5526987369ce4a Mon Sep 17 00:00:00 2001 From: Jason Boutte Date: Thu, 13 Jul 2023 15:36:41 -0700 Subject: [PATCH 1/4] Fixes docs workflow --- .github/workflows/docs.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c7d10f3de44..cd818a8dd53 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,6 +9,8 @@ on: branches: - master + workflow_dispatch: + permissions: contents: read jobs: @@ -20,9 +22,8 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 0 - lfs: true - - uses: tj-actions/changed-files@v32 + fetch-depth: 2 + - uses: tj-actions/changed-files@v37 id: changed-check with: files: doc/** @@ -31,9 +32,7 @@ jobs: contents: write # for peaceiris/actions-gh-pages to push pull-requests: write # to comment on pull requests needs: check-changes - if: | - needs.check-changes.outputs.any_changed == 'true' && - github.event.pull_request.head.repo.full_name == github.repository + if: needs.check-changes.outputs.any_changed == 'true' name: Build and deploy documentation runs-on: ubuntu-latest steps: @@ -61,7 +60,9 @@ jobs: run: | make BUILDDIR=${PWD}/_build -C doc/ html - name: Push PR preview - if: ${{ github.event_name == 'pull_request' }} + if: | + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{secrets.GITHUB_TOKEN}} From 585138e899d1356abd52abdd479c0c685dc4b3b3 Mon Sep 17 00:00:00 2001 From: Jason Boutte Date: Thu, 13 Jul 2023 15:41:15 -0700 Subject: [PATCH 2/4] Test commit --- doc/source/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/source/index.rst b/doc/source/index.rst index 89cc7155218..acaaa14f96e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -11,6 +11,8 @@ The Common Infrastructure for Modeling the Earth (CIME - pronounced Earth system models, data and stub model components, a driver and associated tools and libraries. +Test + Table of contents ----------------- .. toctree:: From e6baa7c369d3ac8c2ea122776091cf5613ea7004 Mon Sep 17 00:00:00 2001 From: Jason Boutte Date: Thu, 13 Jul 2023 15:49:33 -0700 Subject: [PATCH 3/4] Adds path filtering --- .github/workflows/docs.yml | 4 ++++ .github/workflows/testing.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cd818a8dd53..479ed00a349 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,10 +4,14 @@ on: push: branches: - master + paths: + - 'doc/**' pull_request: branches: - master + paths: + - 'doc/**' workflow_dispatch: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b2d6c00e09e..fe526c49553 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -4,10 +4,14 @@ on: push: branches: - master + paths: + - 'CIME/**' pull_request: branches: - master + paths: + - 'CIME/**' concurrency: group: ${{ github.ref }} From a7e08ab530bc302898d8a7a839754e05d51104cb Mon Sep 17 00:00:00 2001 From: Jason Boutte Date: Thu, 13 Jul 2023 15:57:50 -0700 Subject: [PATCH 4/4] Skip testing workflow when only docs are updated --- .github/workflows/testing.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index fe526c49553..e92b0b8c337 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -4,14 +4,14 @@ on: push: branches: - master - paths: - - 'CIME/**' + paths-ignore: + - 'doc/**' pull_request: branches: - master - paths: - - 'CIME/**' + paths-ignore: + - 'doc/**' concurrency: group: ${{ github.ref }}