Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/link-check-cron-crawler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: link-check-cron-crawler

on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
cron-crawler:
runs-on: ubuntu-latest
steps:
- name: Run Crawler Link Checker
run: |
npx -y linkinator https://doris.apache.org --recurse --check-images --skip "^(?!https?://(www\.)?doris\.apache\.org)"
47 changes: 47 additions & 0 deletions .github/workflows/link-check-pr-crawler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: link-check-pr-crawler

on:
pull_request:
paths:
- 'docs/**'
- 'versioned_docs/**'
- 'i18n/**'
- 'src/**'
- 'static/**'
- 'docusaurus.config.js'
- 'sidebars.ts'
- 'versioned_sidebars/**'
- 'versions.json'

concurrency:
group: link-check-pr-crawler-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pr-crawler:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build website
run: yarn build

- name: Serve build folder and scan for 404s/broken images
run: |
npx -y serve build -l 3000 &
# Wait for server to start
sleep 5
npx -y linkinator http://localhost:3000 --recurse --check-images --skip "^(?!http://localhost:3000)"