From 8c9398dfafd6579ac7254cc87b0c80fd359e903f Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 1 Oct 2021 21:01:53 +0100 Subject: [PATCH] :building_construction: Adds actions to unfurl links, and check for broken links in docs --- .github/workflows/docs-link-checker.yml | 27 +++++++++++++++++++++++++ .github/workflows/unfurl-links.yml | 17 ++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/docs-link-checker.yml create mode 100644 .github/workflows/unfurl-links.yml diff --git a/.github/workflows/docs-link-checker.yml b/.github/workflows/docs-link-checker.yml new file mode 100644 index 00000000..e3a3faad --- /dev/null +++ b/.github/workflows/docs-link-checker.yml @@ -0,0 +1,27 @@ +# Checks for any broken links in the docs, and raises an issue if found +name: 🌈 Broken Link Checker +on: + repository_dispatch: + workflow_dispatch: + schedule: + - cron: '0 1 * * 0' # At 01:00 on Sunday. +jobs: + link-checker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Check for Broken Links + uses: lycheeverse/lychee-action@v1.0.8 + with: + args: --verbose --no-progress **/*.md **/*.html + env: + GITHUB_TOKEN: ${{secrets.BOT_GITHUB_TOKEN}} + LYCHEE_OUT: .github/broken-link-report.md + + - name: Raise an Issue with Results + uses: peter-evans/create-issue-from-file@v3 + with: + title: '[DOCS] Broken Links found in Documentation' + content-filepath: .github/broken-link-report.md + labels: '📕 Docs, 👩‍💻 Good First Issue, 💤 Low Priority, 🤖 Auto' \ No newline at end of file diff --git a/.github/workflows/unfurl-links.yml b/.github/workflows/unfurl-links.yml new file mode 100644 index 00000000..95a8feee --- /dev/null +++ b/.github/workflows/unfurl-links.yml @@ -0,0 +1,17 @@ +# Expands any raw pasted link in comments. Useful so people know what they're clicking +name: 🎯 Unfurl Links +on: + issues: + types: [opened, edited] + issue_comment: + types: [created, edited] + pull_request: + types: [opened, edited] +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: wow-actions/unfurl-links@v1 + with: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + raw: true