Skip to content

Commit

Permalink
Stop attempting to comment link to RTD for non-PRs (NOAA-EMC#2209)
Browse files Browse the repository at this point in the history
Adds a check so comments with a link to documentation are only generated
for PRs.
  • Loading branch information
aerorahul committed Jan 8, 2024
1 parent 4e160a8 commit 69605ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:

documentation:

permissions:
pull-requests: 'write'

Expand Down Expand Up @@ -56,7 +56,8 @@ jobs:
path: artifact/doc_warnings.log
if-no-files-found: ignore

- name: Comment ReadDocs
- name: Comment ReadDocs Link in PR
if: github.event_name == "pull_request"
uses: actions/github-script@v6
with:
script: |
Expand All @@ -68,5 +69,5 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: message
})
body: message
})

0 comments on commit 69605ea

Please sign in to comment.