Skip to content

Commit

Permalink
fix(docs): only post a single preview comment
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Feb 28, 2024
1 parent 631208c commit 3d3e9e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/mkdocs-pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,17 @@ jobs:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_PREVIEW_APP_SITE_ID }}

- name: Find existing comment
uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ github.event.number }}
comment-author: "github-actions[bot]"
body-includes: "Preview url: https://"

- name: Add Netlify link PR comment
uses: actions/github-script@v3
if: steps.find-comment.outputs.comment-id == ''
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down

0 comments on commit 3d3e9e4

Please sign in to comment.