Skip to content

deploy-error

deploy-error #708

Workflow file for this run

name: deploy-error
on:
workflow_run:
workflows: [DEPLOY, DOCS_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/github-slug-action@v3.x
- 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/slack-github-action@v1.25.0
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. Check the GitHub Actions tab for your repo here: https://github.com/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }} , see also the docs here: https://smile.gureckislab.org/deploying.html#debugging-deployment-issues"
}