-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c337bf
commit 10e67cb
Showing
2 changed files
with
38 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# .github/workflows/preview.yml | ||
name: Deploy PR previews | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
|
||
concurrency: preview-${{ github.ref }} | ||
|
||
jobs: | ||
deploy-preview: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and Build | ||
if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed | ||
run: | | ||
yarn install | ||
yarn build:pr:preview | ||
- name: Deploy preview | ||
uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
source-dir: ./build/ | ||
|
||
- name: Delete Preview | ||
- uses: rossjrw/pr-preview-action@v1 | ||
if: github.event.action == "closed" && !github.event.pull_request.merged | ||
with: | ||
source-dir: ./build/ | ||
action: remove |
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