ci(docs): validate vitepress builds on pull requests

This commit is contained in:
Daniel Radl 2026-08-19 19:56:33 +02:00
parent 2bb1a0af71
commit bb2ba1023f
1 changed files with 20 additions and 4 deletions

View File

@ -1,6 +1,9 @@
name: Docs / Publish Site
on:
pull_request:
branches: [main]
merge_group:
push:
branches: [main]
paths:
@ -10,19 +13,18 @@ on:
permissions:
contents: read
pages: write
id-token: write
defaults:
run:
working-directory: ./docs
concurrency:
group: pages
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
docs-build:
name: Docs / Build (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
@ -57,10 +59,24 @@ jobs:
run: pnpm docs:build
- name: Upload artifact
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-pages-artifact@v5
with:
path: docs/.vitepress/dist
deploy:
name: Deploy docs
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
needs: docs-build
runs-on: ubuntu-latest
concurrency:
group: pages
cancel-in-progress: true
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5