Files

62 lines
1.5 KiB
YAML

name: Validate collection
on:
push:
branches: [master]
paths:
- "**/*.md"
- "cheat_sheets/**"
- "scripts/validate_collection.py"
- ".github/workflows/validate.yml"
pull_request:
paths:
- "**/*.md"
- "cheat_sheets/**"
- "scripts/validate_collection.py"
- ".github/workflows/validate.yml"
schedule:
- cron: "17 3 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: validate-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
collection:
name: Collection structure
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Validate local links and PDF inventory
run: python3 scripts/validate_collection.py
links:
name: Live links
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Check Markdown links
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args: >-
--root-dir "${{ github.workspace }}"
--verbose
--no-progress
--max-retries 3
--timeout 20
'./**/*.md'
fail: true
failIfEmpty: true
jobSummary: true
token: ${{ github.token }}