Skip to content

chore: refresh content and add lint + link-check workflows #2

chore: refresh content and add lint + link-check workflows

chore: refresh content and add lint + link-check workflows #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
schedule:
# Mondays at 14:00 UTC, so broken links surface even between contributions.
- cron: "0 14 * * 1"
workflow_dispatch:
# Cancel in-progress runs for pull requests when developers push new changes.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Validate formatting
run: bun fmt:ci
lint-awesome:
name: Lint awesome list
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: latest
- name: Run awesome-lint
run: bun x awesome-lint
lint-typos:
name: Check for typos
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Run typos
uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1.47.2
with:
config: .github/typos.toml
link-check:
name: Check links
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Run lychee
id: lychee
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
with:
args: >-
--verbose
--no-progress
--max-concurrency 4
--retry-wait-time 5
--accept 200,206,403,429
'./**/*.md'
fail: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Open or update an issue when the scheduled run fails
if: failure() && github.event_name == 'schedule'
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
with:
title: Broken links detected by scheduled link check
content-filepath: ./lychee/out.md
labels: broken-links, automated