Skip to content

Commit 8b8df6f

Browse files
committed
Add a comment with preview URLs to pull requests.
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent e91ff21 commit 8b8df6f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/reports.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
permissions:
1212
contents: write
13+
pull-requests: write
1314

1415
concurrency:
1516
group: "pages"
@@ -105,6 +106,17 @@ jobs:
105106
keep_files: false
106107
force_orphan: false
107108

109+
- name: Comment preview URLs on pull request
110+
if: github.event_name == 'pull_request'
111+
uses: marocchino/sticky-pull-request-comment@v2
112+
with:
113+
header: pr-preview
114+
message: |
115+
🚀 Preview is available for this pull request.
116+
117+
- Docs: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/previews/pr-${{ github.event.pull_request.number }}/
118+
- Coverage: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/previews/pr-${{ github.event.pull_request.number }}/coverage/
119+
108120
cleanup_preview:
109121
if: github.event_name == 'pull_request' && github.event.action == 'closed'
110122
name: Cleanup Pull Request Preview

0 commit comments

Comments
 (0)