Skip to content

Merge branch 'develop' of https://github.com/PixelRoot32-Game-Engine/… #47

Merge branch 'develop' of https://github.com/PixelRoot32-Game-Engine/…

Merge branch 'develop' of https://github.com/PixelRoot32-Game-Engine/… #47

Workflow file for this run

name: Documentation CI
on:
push:
branches: [main, develop]
paths:
- 'guide/**'
- 'api/**'
- 'architecture/**'
- 'philosophy/**'
- 'migration/**'
- 'examples/**'
- 'tools/**'
- 'index.md'
- 'home.md'
- '.vitepress/**'
- 'package.json'
- 'package-lock.json'
- 'scripts/sync-docs-from-engine.mjs'
- '.github/workflows/documentation.yml'
pull_request:
branches: [main, develop]
paths:
- 'guide/**'
- 'api/**'
- 'architecture/**'
- 'philosophy/**'
- 'migration/**'
- 'examples/**'
- 'tools/**'
- 'index.md'
- 'home.md'
- '.vitepress/**'
- 'package.json'
- 'package-lock.json'
- 'scripts/sync-docs-from-engine.mjs'
- '.github/workflows/documentation.yml'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Checkout engine (canonical documentation source)
uses: actions/checkout@v4
with:
repository: PixelRoot32-Game-Engine/PixelRoot32-Game-Engine
path: engine
ref: ${{ vars.ENGINE_DOCS_REF || 'main' }}
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Sync all engine docs, verify no drift
run: |
node scripts/sync-docs-from-engine.mjs --engine ./engine
rm -rf ./engine
git diff --stat tools examples guide api architecture philosophy migration
- name: Build documentation
env:
# Default: GitHub project pages https://<owner>.github.io/<repo>/
# Custom domain on the repo root (e.g. docs.example.org): set repo variable VITEPRESS_BASE to /
VITEPRESS_BASE: ${{ vars.VITEPRESS_BASE || format('/{0}/', github.event.repository.name) }}
run: npm run docs:build
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: .vitepress/dist
deploy:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4