Skip to content

Telegram notification integration

Tom Stein edited this page Jan 5, 2023 · 2 revisions

Using the Telegram action from appleboy/telegram-action you can easily get notified on telegram if a run of the Broken-Links-Crawler fails by a telegram bot. Check the documentation of appleboy/telegram-action on how to configure the secrets.

name: Site Reliability
on: 
  push:
    branches: 
      - master
jobs:
  crawl_for_broken_links:
    runs-on: ubuntu-latest
    name: Broken-Links-Crawler
    steps:
    - name: Checking links
      id: checking
      uses: ScholliYT/Broken-Links-Crawler-Action@v3
      with:
        website_url: 'https://tomstein.me'
    # Use the output from the `checking` step
    - name: Telegram Message Notify on Error
      uses: appleboy/telegram-action@0.1.0
      if: failure()
      id: notify_on_error_telegram
      env:
        TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
        TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
      with:
        args: Found broken links on https://tomstein.me/!
Clone this wiki locally