Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 31 additions & 19 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Deploy Site to GitHub Pages
name: Build and test site

on:
push:
branches:
- main
pull_request:

jobs:
build:
name: Build Astro site
Expand All @@ -16,29 +18,39 @@ jobs:
with:
node-version: 23
cache: npm

- name: Install dependencies
run: npm ci
- name: Build website
run: |
npm run build
ls dist/

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
- name: Upload html output as artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
path: dist/
deploy:
name: Deploy to GitHub Pages
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: html-${{ github.run_id }}
path: ./dist
link_check:
name: Check internal links
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
- name: Checkout lychee config file from repository
uses: actions/checkout@v5
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@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.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
21 changes: 0 additions & 21 deletions .github/workflows/offline-link-check.yml

This file was deleted.