Skip to content

Commit

Permalink
Merge pull request #4458 from ESMCI/fix_docs_workflow
Browse files Browse the repository at this point in the history
Fixes/updates:

    Fixes cloning correct depth to detect changes
    Fixes skipping testing workflow when only doc's are changed
    Updates using paths to filter triggers
    Updates changed-files version

Test suite: n/a
Test baseline: n/a
Test namelist changes: n/a
Test status: n/a

Fixes n/a
User interface changes?: N
Update gh-pages html (Y/N)?: Y
  • Loading branch information
jasonb5 authored Jul 13, 2023
2 parents 2c3e915 + a7e08ab commit e487b6c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ on:
push:
branches:
- master
paths:
- 'doc/**'

pull_request:
branches:
- master
paths:
- 'doc/**'

workflow_dispatch:

permissions:
contents: read
Expand All @@ -20,9 +26,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/**
Expand All @@ -31,9 +36,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:
Expand Down Expand Up @@ -61,7 +64,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}}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ on:
push:
branches:
- master
paths-ignore:
- 'doc/**'

pull_request:
branches:
- master
paths-ignore:
- 'doc/**'

concurrency:
group: ${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down

0 comments on commit e487b6c

Please sign in to comment.