-
Notifications
You must be signed in to change notification settings - Fork 0
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
6216de5
commit f86d567
Showing
2 changed files
with
67 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## Description | ||
|
||
- List of changes | ||
|
||
## Issue(s) | ||
|
||
Fixes # | ||
|
||
## How to test | ||
|
||
1. Go to {deployment_url} | ||
2. Click on \_\_\_\_\_\_ | ||
3. You should see \_\_\_\_\_\_ | ||
|
||
## Screenshots | ||
|
||
How it used to look (delete if n/a): | ||
{screenshots} | ||
|
||
How it should now look: | ||
{screenshots} | ||
|
||
## Checklist | ||
|
||
- [ ] Manually tested across browsers / devices | ||
- [ ] Considered impact on accessibility | ||
- [ ] Does this PR update a package with a breaking change |
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,40 @@ | ||
name: Deployment Actions | ||
|
||
on: deployment_status | ||
|
||
jobs: | ||
dump_github_event: | ||
uses: ./.github/workflows/dump_event.yml | ||
|
||
# Do a find-and-replace to add a link to the deployment to the PR body | ||
update_pr_description: | ||
# Only want to run on success, otherwise it might be "pending", or "failure". | ||
# Filter out storybook deployments and temporarily Netlify deployments | ||
if: ${{ (github.event.deployment.ref != 'main') && (github.event.deployment_status.state == 'success') && !startsWith(github.event.deployment_status.environment, 'storybook')}} | ||
name: Add deploy URL to PR description | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Note we can't use caching here, because caching needs GITHUB_REF to be defined, | ||
# and Vercel deployment_status events set deployment.ref to the SHA, not the triggering | ||
# branch or pull request. | ||
# https://github.com/actions/cache/issues/319 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "npm" | ||
- run: npm ci | ||
|
||
- uses: ./.github/actions/ref_from_sha | ||
name: Get PR Ref from SHA | ||
id: ref_from_sha | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: mcky/[email protected] | ||
with: | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
prNumber: ${{ steps.ref_from_sha.outputs.pr_number }} | ||
find: "{deployment_url}" | ||
replace: ${{ github.event.deployment_status.environment_url }} |