Merge pull request #1966 from AMR-Mannesmann/ci(docs)-validate-vitepress-builds

ci(docs): validate vitepress builds on pull requests
This commit is contained in:
Daniel Radl 2026-08-19 20:53:21 +02:00 committed by GitHub
commit c94c98566e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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