This repo is part of the tech-docs-template, and is used in conjunction with the page expiry feature that is part of the tech-docs-gem
Travis CI will run the script once a day during weekdays. It will look at the pages API for your site, find all pages that have expired, and post a Slack message to the owner of each page to let them know that it needs reviewing.
If you are part of the alphagov
GitHub organisation you can enable the notifier by raising a PR to add your published documentation to the .travis.yml
file:
matrix:
- SITE_PAGE_API_URL=https://www.docs.verify.service.gov.uk/api/pages.json
- SITE_PAGE_API_URL=https://gds-way.cloudapps.digital/api/pages.json
- SITE_PAGE_API_URL=https://<YOUR_PUBLISHED_DOCS>/api/pages.json
If you are not part of the alphagov
GitHub organisation, you can still configure Travis CI to automatically deploy the notifier:
- Fork the
tech-docs-monitor
repository - Get an incoming Slack webhook for the notifier
- Run
travis encrypt
to add the encrypted webhook to your.travis.yml
file - Add your published documentation page API URL to
env.matrix
in your.travis.yml
file
If you want to use something other than Travis CI to deploy the notifier, you must make sure all its environment variables are defined:
SITE_PAGE_API_URL
: The full URL to your site's/api/pages.json
file.SLACK_WEBHOOK_URL
: The Slack webhook URL to allow messages to be posted.REALLY_POST_TO_SLACK
: Messages will only be posted to Slack if the value of this var is1
.
The gem is available as open source under the terms of the MIT License.