-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: separate
share-preview-url
action (#27)
- Loading branch information
1 parent
d438053
commit c33f30f
Showing
2 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: share-preview-url | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- ready_for_review | ||
|
||
jobs: | ||
comment-on-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: get dest dir | ||
id: get_dest_dir | ||
run: echo "DEST_DIR=js/preview-$GITHUB_HEAD_REF" >> "$GITHUB_OUTPUT" | ||
- name: share preview url as PR comment | ||
uses: unsplash/comment-on-pr@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
msg: "This branch has been deployed to s3 / cloudfront.\n\n✅ Preview URL: https://cdn.smileidentity.com/${{ steps.get_dest_dir.outputs.DEST_DIR }}/smart-camera-web.js" | ||
|