/gha-page-change-monitor

One weird trick for monitoring web pages

Primary LanguagePython

Using Github Actions as a tool for webpage change notification

Want to get an email when a certain bit of text on a page has changed?

Use Github Actions!

  1. Fork this repo
  2. Edit the top bit of .github/workflows/pagediff.yaml:
    env:  # Define diff target here
      # The page to visit
      URL: 'https://sebbacon.github.io/'
      # The XPath for the content you're interested in
      # (try right-clicking the element in the inspector in Chromium)
      XPATH: '/html/body/header/div/a'
      # A filename where we will save the contents of that XPath
      FILE_PATH: 'sebbacon.html'
  3. Set up Email Notifications (in the Settings of your repo) to get an alert when the action fails (i.e. when there's a new diff to report)

Thanks to Dave for pointing out this one wierd trick some years ago.