Skip to content

chore(ci): bump the actions group with 2 updates (#1008) #70

chore(ci): bump the actions group with 2 updates (#1008)

chore(ci): bump the actions group with 2 updates (#1008) #70

Workflow file for this run

name: Build and test site
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Build Astro site
runs-on: ubuntu-latest
steps:
- uses: /actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 23
cache: npm
- name: Install dependencies
run: npm ci
- name: Build website
run: |
npm run build
- name: Upload html output as artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: html-${{ github.run_id }}
path: ./dist
link_check:
name: Check internal links
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout lychee config file from repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: |
lychee.toml
sparse-checkout-cone-mode: false
- name: Ensure destination folder exists
run: |
mkdir ./dist
- name: Download html files from artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: html-${{ github.run_id }}
path: ./dist
- name: Offline link check
uses: lycheeverse/lychee-action@v2
with:
# Only check local files, no network requests
args: --config './lychee.toml' --no-progress --offline --root-dir "$GITHUB_WORKSPACE/dist/" dist/**/*.html
# Fail job when lychee returns a non-zero exit code
fail: true