From c01fa70e9c56de59ea7725087aa1f072148d3e3f Mon Sep 17 00:00:00 2001 From: Prashant Shahi Date: Wed, 4 Sep 2024 19:39:14 +0530 Subject: [PATCH] ci(linkchecker): GitHub workflow for linkchecker (#510) * ci(linkchecker): GitHub workflow for linkchecker * ci(linkchecker): log default SIGNOZ_WEBSITE_URL * ci(linkchecker): enable external links and use 100 threads * ci(linkchecker): ignore localhost --------- Signed-off-by: Prashant Shahi --- .github/workflows/lintchecker.yaml | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/lintchecker.yaml diff --git a/.github/workflows/lintchecker.yaml b/.github/workflows/lintchecker.yaml new file mode 100644 index 000000000..bbfc6b104 --- /dev/null +++ b/.github/workflows/lintchecker.yaml @@ -0,0 +1,38 @@ +name: linkchecker + +# run every day at 10:00AM UTC - 3:30PM IST +on: + schedule: + - cron: '0 10 * * *' + + workflow_dispatch: + inputs: + signozWebsiteUrl: + description: 'SigNoz Website URL' + type: string + required: false + +jobs: + linkchecker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install linkchecker + run: | + pip3 install linkchecker + + - name: Run linkchecker + env: + SIGNOZ_WEBSITE_URL: ${{ github.event.inputs.signozWebsiteUrl }} + run: | + set -e + + if [ -z "$SIGNOZ_WEBSITE_URL" ]; then + SIGNOZ_WEBSITE_URL=https://signoz.io + fi + + echo "SIGNOZ_WEBSITE_URL: $SIGNOZ_WEBSITE_URL" + + linkchecker -t 100 --check-extern --ignore localhost $SIGNOZ_WEBSITE_URL