name: Check the README on: push: branches: [main] paths: - README.md - .github/lychee.toml - .github/scripts/check-readme-order*.mjs - .github/workflows/linkchecker.yml pull_request: paths: - README.md - .github/lychee.toml - .github/scripts/check-readme-order*.mjs - .github/workflows/linkchecker.yml workflow_dispatch: permissions: contents: read concurrency: group: link-check-${{ github.ref }} cancel-in-progress: true jobs: LinkChecker: runs-on: ubuntu-latest timeout-minutes: 5 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Test entry order checker run: node --test .github/scripts/check-readme-order.test.mjs - name: Check entry order if: github.event_name == 'pull_request' env: BASE_REF: ${{ github.base_ref }} run: | git fetch --no-tags --depth=1 origin "$BASE_REF" git show FETCH_HEAD:README.md > "$RUNNER_TEMP/README.base.md" node .github/scripts/check-readme-order.mjs "$RUNNER_TEMP/README.base.md" README.md - name: Check links uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 with: args: --config .github/lychee.toml README.md lycheeVersion: v0.24.2