-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
(cherry picked from commit f223ef4) Co-authored-by: Karl Cardenas <[email protected]>
- Loading branch information
1 parent
d95afb4
commit cde0711
Showing
1 changed file
with
65 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,65 @@ | ||
name: Release Branch PRs | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
branches: | ||
- "release-[0-9]-[0-9]" | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MENDABLE_API_KEY: ${{ secrets.MENDABLE_API_KEY }} | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
|
||
|
||
concurrency: | ||
group: preview-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
cache: "npm" | ||
|
||
- run: npm ci | ||
|
||
|
||
- name: Post Netlify progress | ||
uses: mshick/add-pr-comment@v2 | ||
with: | ||
message: | | ||
🤖 Starting the Netlify preview build for commit ${{ github.sha }}. This may take a few minutes. | ||
refresh-message-position: true | ||
|
||
|
||
- name: Deploy to Netlify | ||
id: netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: ./build | ||
deploy-message: 'Manual Netlify deployment from GitHub Actions - ${{ github.sha }}' | ||
enable-pull-request-comment: true | ||
overwrites-pull-request-comment: true | ||
enable-commit-comment: true | ||
|
||
- name: Post Netlify URL | ||
uses: mshick/add-pr-comment@v2 | ||
with: | ||
message: | | ||
🚀 Netlify preview deployed succesfully for commit ${{ github.sha }}. Click [here](${{steps.netlify.outputs.deploy-url}}) to preview the changes. | ||
message-failure: | | ||
👎 Uh oh! The Netlify Preview failed to deploy for commit ${{ github.sha }}. Please check the Netlify logs for more information. | ||
refresh-message-position: true | ||
update-only: true | ||
|