forked from withastro/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add link checker to CI workflow (withastro#476)
* Feat: Add link checker to CI workflow * Fix line number, add location to message * Prevent annotating partial href matches * Improve annotation summary, get ready for PR * Wrap overly long line * Minor improvements Co-authored-by: Chris Swithinbank <[email protected]>
- Loading branch information
1 parent
2241877
commit 1a25683
Showing
2 changed files
with
132 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,31 +4,35 @@ on: | |
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
branches: [main] | ||
|
||
# Automatically cancel in-progress actions on the same branch | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
slugcheck: | ||
name: Check for Mismatched Slugs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
- name: Install Tools & Dependencies | ||
uses: ./.github/actions/install | ||
|
||
- name: Setup Node.js 16.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
cache: 'pnpm' | ||
- name: Run Check | ||
run: pnpm run lint:slugcheck | ||
linkcheck: | ||
name: Check Links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Dependencies | ||
run: pnpm install | ||
- name: Install Tools & Dependencies | ||
uses: ./.github/actions/install | ||
|
||
- name: Check for mismatched slugs | ||
run: pnpm run lint:slugcheck | ||
- name: Run Check | ||
run: pnpm run lint:linkcheck |
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