Skip to content

DEPLOY_ERROR_NOTIFY #31

DEPLOY_ERROR_NOTIFY

DEPLOY_ERROR_NOTIFY #31

Workflow file for this run

name: DEPLOY_ERROR_NOTIFY
on:
workflow_run:
workflows: [DEPLOY]
types: [completed]
jobs:
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Send notification to lab slack
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_ERROR_URL }}
if: ${{ env.SLACK_WEBHOOK_URL != '' }} # this should only run if SLACK_WEBHOOK_URL exists
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"github_username": "${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}",
"message": "I'm sorry to report there was an error building and deploying your site. Please see https://smile.gureckislab.org/deploying.html#debugging-deployment-issues"
}