Skip to content

Commit 0ad2cab

Browse files
add PR comment post to PR deploy preview action
1 parent 5aec41a commit 0ad2cab

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/deploy_pr_preview.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Rebuild and deploy PR version of book to gh-pages branch in pull###/ folder"
22
on:
33
pull_request:
4-
types: [reopened, opened, synchronize]
4+
types: [opened, synchronize]
55
paths:
66
- source/**
77
jobs:
@@ -18,7 +18,8 @@ jobs:
1818
ref: ${{ github.ref }}
1919
check-name: 'Rebuild docker image'
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
21-
- name: checkout
21+
22+
- name: Checkout the repo
2223
uses: actions/checkout@v2
2324
with:
2425
fetch-depth: '0'
@@ -38,5 +39,11 @@ jobs:
3839
destination_dir: pull${{ github.event.number }}
3940
# force_orphan: true # once peaceiris updates to v4, change this to true and keep_files: true for the PR / main branch deploy previews
4041

41-
42-
42+
- name: Post URLS to PR thread
43+
uses: mshick/[email protected]
44+
with:
45+
message: |
46+
"""
47+
- PR deploy preview available [here](https://python.datasciencebook.ca/pull${{ github.event.number }}/index.html)
48+
- Current `main` deploy preview available [here](https://python.datasciencebook.ca/dev/index.html)
49+
"""

0 commit comments

Comments
 (0)