Skip to content

Commit

Permalink
ci: release branch PRs triggers (#1803) (#1812)
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.
65 changes: 65 additions & 0 deletions .github/workflows/release-branch-pr.yaml
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

0 comments on commit cde0711

Please sign in to comment.