After the Deploy

By Syncfusion®, Inc. · Last updated

Tell the team when a run fails, set alerts that are quiet but quick, read debug logs, run on Windows when you must, and keep the runner bill small.

What you will learn

  • Send a message when a run fails
  • Put a link to the run in the message
  • Set an alert that is quiet but quick
  • Turn on debug logging
  • Run on Windows only where needed
  • Cut the runner bill

After the Deploy

The release is live. The pipeline is green. The work is not over.

  • A run on main can fail at night, and nobody looks at the Actions tab.
  • Production can slowly break an hour after the smoke test passed.
  • A step can be skipped, and the log does not say why.
  • The runner bill can double without anyone noticing.

You will add messages, alerts, debug logs and cost checks.

Simple lesson: a pipeline you cannot see is a pipeline you cannot trust.

A Real-World Example

Think about a school water tank.

  • A float alarm rings when the tank is nearly empty. Nobody needs to climb up and look.
  • But if it rings every time the water ripples, people start ignoring it.
  • When the pump stops, the caretaker opens the cover and checks each pipe.
  • The school also checks the electricity bill each month.

Now map it:

  • Alarm = an alert on production.
  • Rings too often = a noisy alert.
  • Opening the cover = debug logging.
  • Electricity bill = runner minutes.

Simple lesson: be told when it matters, see inside when it breaks, and watch the bill.

Tell the Team When It Breaks

  • Email from GitHub or Azure goes to the person who pushed. Others never see it.
  • A message in the team chat reaches everyone.
  • Send it only on failure, from the last step.
PlatformStepCondition
GitHub Actionsslackapi/slack-github-actionif: failure()
Azure Pipelinesa curl to the chat webhookcondition: failed()

The webhook URL is a secret. Anyone with it can post into your channel. Store it as SLACK_WEBHOOK_URL, never in the YAML. Microsoft Teams and Discord work the same way with their own webhooks.

Simple lesson: failure messages go to the team, with the run link in them.

Alerts on Production

A pipeline message is about the pipeline. An alert is about the live app.

  • A tool like Azure Monitor watches a number, like the error rate.
  • An alert rule has a threshold (how bad) and a window (for how long).
  • A small window fires on every blip. People stop reading it.
  • A big window, or a high threshold, fires too late, or never.

Simple lesson: an alert must be quiet on a normal day and loud within minutes of a real problem.

Turn On Debug Logging

When a step is skipped or a value is empty, the normal log may not say why.

PlatformTurn on debug logs
GitHub ActionsRe-run jobs → Enable debug logging, or a variable ACTIONS_STEP_DEBUG: true
Azure PipelinesRun pipeline → Enable system diagnostics, or a variable system.debug: true

To try a GitHub workflow on your laptop, use act (nektos/act). It runs jobs in Docker. It is good for quick checks, but it is not a perfect copy of GitHub's runners.

Simple lesson: debug logs show why each step ran or was skipped.

Runners and Cost

  • GitHub-hosted runners for private repos are billed by the minute.
  • Windows minutes cost 2 times Linux. macOS costs 10 times.
  • Public repos and self-hosted runners are not billed this way.
  • Azure Pipelines bills by parallel jobs, not minutes.

Run on Windows only the jobs that need it:

A self-hosted runner is your own machine. It is cheaper for heavy builds, but you must patch it. Never use one for public repos: a pull request from anyone could run code on it.

Simple lesson: pick the cheapest runner that does the job.

  1. Create a Slack incoming webhook (or a Teams one) for a test channel.
  2. Add it as the repository secret SLACK_WEBHOOK_URL.
  3. Add the "Tell the team" step to your test job.
  4. Break a test, push to main, then undo it.

What you should see: one message in the channel with a link that opens the failed run.

Quick Check

Cheat Sheet

GitHub Actions:

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - run: npm run lint

  test:
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - run: npm test
      - name: Tell the team
        if: failure()
        uses: slackapi/slack-github-action@v2
        with:
          webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
          webhook-type: incoming-webhook
          payload: |
            text: "CI failed on ${{ github.ref_name }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

Azure Pipelines:

variables:
  system.debug: false

jobs:
  - job: test
    strategy:
      matrix:
        linux:
          imageName: ubuntu-latest
        windows:
          imageName: windows-latest
    pool:
      vmImage: $(imageName)
    steps:
      - script: npm test
      - script: |
          curl -X POST -H 'Content-type: application/json' --data '{"text":"Pipeline failed: $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)"}' $(SLACK_WEBHOOK_URL)
        condition: failed()

Common mistakes

MistakeWrong ideaCorrect ideaWhat goes wrong
Message on every runMore news is betterOnly on failurePeople mute the channel
Message with no link"Failed" is enoughLink to the runPeople waste time finding it
Webhook URL in YAMLIt is only a URLIt is a secretAnyone can post in your channel
Alert window of 1 minuteFaster is saferAverage a few minutesFalse alarms all day
Everything on WindowsIt is the sameWindows costs 2 timesThe bill doubles
Debug logging always onMore logs helpTurn it on to investigateHuge, slow logs

What to Remember

  • Failure messages: last step, failure() or failed(), with a run link, to the team chat.
  • Alerts watch the live app: a threshold and a window, quiet but quick.
  • Debug logs show why steps ran or were skipped.
  • Linux by default. Windows or macOS only where needed.

Exercises

Next: Delivery Metrics