⚡ Update #89
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
name: build | |
on: | |
pull_request: | |
branches: | |
- main | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_USERNAME: ✨ GatsbyBlog Bot | |
SLACK_CHANNEL: github-notifier | |
SLACK_ICON_EMOJI: 🎅 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 14.x | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- name: Slack Notification on Success | |
if: ${{ success() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_TITLE: ✅ Pull requests can be merged | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: 'Pull requests can be merged ✨: ${{ github.repository }}' | |
- name: Slack Notification on Failure | |
if: ${{ failure() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_TITLE: ❌ Deploy Failure | |
SLACK_COLOR: ${{ job.status }} |