Links on canonical.com live #170
This file contains hidden or 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: Links on canonical.com live | |
| on: | |
| schedule: | |
| - cron: "20 7 * * *" | |
| jobs: | |
| check-links: | |
| if: github.repository == 'canonical/canonical.com' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install linkchecker | |
| run: sudo pip install LinkChecker | |
| - name: Write linkchecker config file | |
| run: | | |
| mkdir -p ~/.linkchecker | |
| cat > ~/.linkchecker/linkcheckerrc <<EOF | |
| [checking] | |
| maxrequestspersecond=5 | |
| recursionlevel=2 | |
| timeout=1000 | |
| sslverify=0 | |
| [filtering] | |
| checkextern=1 | |
| ignore= | |
| https://res.cloudinary.com | |
| q_auto | |
| fl_sanitize | |
| c_fill | |
| e_sharpen | |
| w_[0-9]* | |
| h_[0-9]* | |
| https://canonical.com/blog | |
| https://ubuntu.com/blog | |
| https://canonical.com/static/css/* | |
| https://www.xilinx.com/* | |
| https://player.vimeo.com/video/* | |
| http://atea.com | |
| https://linuxpolska.com/* | |
| https://www.packet.net | |
| https://www.amd.com/ | |
| https://start.microsemi.com | |
| http://www.omnicore-it.com/ | |
| http://www.pgp.com/ | |
| https://www.hcl.com/ | |
| http://www.randrinc.com/ | |
| https://www.storagemadeeasy.com/ | |
| [output] | |
| status=0 | |
| warnings=0 | |
| ignoreerrors= | |
| ^http?s://.* ^.*(471|500|503|504|400|403|401) | |
| EOF | |
| - name: Run linkchecker for 404 errors only | |
| run: linkchecker --no-warning https://canonical.com | |
| - name: Send message on failure | |
| if: failure() | |
| run: curl -X POST -F "workflow=${GITHUB_WORKFLOW}" -F "repo_name=${GITHUB_REPOSITORY}" -F "action_id=${GITHUB_RUN_ID}" ${{ secrets.BOT_URL }}?room=web-design |