Skip to content

ci: check dead links and broken file references #487

ci: check dead links and broken file references

ci: check dead links and broken file references #487

Workflow file for this run

# To not merge, if build fails
name: Tact Docs CI
on:
# For new PRs, or those who are ready and/or request a review
pull_request:
types:
[
"opened",
"edited",
"reopened",
"synchronize",
"ready_for_review",
"review_requested",
]
branches: ["main"]
# Only start the workflow if anything inside the docs has changed
paths: ["docs/**"]
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow simultaneous checks
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
test-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# with:
# fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
- name: Perform syntax and type checking of the Cookbook
working-directory: docs
run: node scripts/check-cookbook-examples.js
- name: Install dependencies
working-directory: docs
run: yarn deps
- name: Check broken HTTPS links
uses: lycheeverse/lychee-action@v2
with:
args: "-n -s https -f compact --exclude-path docs/node_modules --base 'https://docs.tact-lang.org' --exclude '.*?\\.(?:jpg|png)' docs/README.md './docs/**/*.mdx'"
output: "/dev/null"
fail: true
failIfEmpty: false
- name: Check broken file references in README
uses: lycheeverse/lychee-action@v2
with:
args: "-n -s file -f compact docs/README.md"
output: "/dev/null"
fail: true
failIfEmpty: false
- name: Build the site
working-directory: docs
run: yarn build