mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
ci: add new link checker workflow for website (#8516)
Turns out we have several broken links on our website currently. Broken links don't make a good impression so we should catch them as early as possible. Due to how our website is laid out, that isn't always possible to catch these dead links in CI. The next best thing we can do is run a cron-job in our CI that checks our sourcecode and makes sure all links (including relative ones) are reachable. --------- Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
This commit is contained in:
34
.github/workflows/website-links.yml
vendored
Normal file
34
.github/workflows/website-links.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Website Links
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "00 18 * * *"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: website # Specify working directory to ensure the `.lycheeignore` file is picked up.
|
||||
|
||||
jobs:
|
||||
linkChecker:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write # required for peter-evans/create-issue-from-file
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check links on website
|
||||
id: lychee
|
||||
uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 # v2.3.0
|
||||
with:
|
||||
fail: false
|
||||
args: --verbose --no-progress --exclude-all-private --base https://firezone.dev .
|
||||
|
||||
- name: Create Issue From File
|
||||
if: steps.lychee.outputs.exit_code != 0
|
||||
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
|
||||
with:
|
||||
title: Link Checker Report
|
||||
content-filepath: ./lychee/out.md
|
||||
labels: report, automated issue
|
||||
8
website/.lycheeignore
Normal file
8
website/.lycheeignore
Normal file
@@ -0,0 +1,8 @@
|
||||
# Links included in our website known to not be broken but lychee can't check them :(
|
||||
|
||||
https://www.gartner.com/en/information-technology/glossary/zero-trust-network-access-ztna-/
|
||||
https://portal.azure.com
|
||||
https://x.com/firezonehq
|
||||
https://admin.google.com/ac/owl
|
||||
https://www.flexjobs.com/blog/post/exploring-the-impact-of-remote-work-on-mental-health-and-the-workplace/
|
||||
.prettierrc.json
|
||||
Reference in New Issue
Block a user