docs link checker #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs link checker | |
on: | |
schedule: | |
- cron: '20 8 * * *' | |
jobs: | |
check-links: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y linkchecker | |
- name: Check links | |
id: linkcheck | |
run: linkchecker https://docs.lavague.ai/en/latest/ | |
notify: | |
runs-on: ubuntu-latest | |
needs: [check-links] | |
if: ${{ failure() || needs.check-links.outcome == 'failure' }} | |
steps: | |
- name: Send failure notification via Discord | |
uses: Ilshidur/action-discord@0c4b27844ba47cb1c7bee539c8eead5284ce9fa9 | |
with: | |
args: "The link check failed, please review." | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DOCS_DISCORD_WEBHOOK }} |