docs: add CI action to check links #1470
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
name: Docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "docs/**" | |
- ".github/workflows/docs.yml" | |
pull_request: | |
paths: | |
- "docs/**" | |
- ".github/workflows/docs.yml" | |
workflow_dispatch: | |
jobs: | |
linkcheck: | |
name: Check links | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup prerequisites | |
uses: ./.github/actions/setup-prerequisites | |
- name: Install node dependencies | |
working-directory: docs | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
working-directory: docs | |
run: pnpm build | |
- name: Start | |
working-directory: docs | |
run: pnpm start & npx wait-on --timeout 5000 http://127.0.0.1:3000 | |
# TODO: wait for server to be online? | |
- name: Check links | |
uses: filiph/linkcheck@3.0.0 | |
with: | |
arguments: http://127.0.0.1:3000 |