micromissiles-unity/.github/workflows/docs.yaml

47 lines
999 B
YAML
Raw Normal View History

2024-09-30 02:05:26 -07:00
# .github/workflows/docs.yaml
name: Deploy Documentation
on:
2024-09-30 02:05:26 -07:00
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch: # Allows manual triggering
permissions:
2024-09-30 02:43:17 -07:00
contents: write
pages: write
id-token: write
jobs:
build-deploy:
2024-09-30 02:43:17 -07:00
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Use Node.js 18
- name: Install dependencies
2024-09-30 02:26:02 -07:00
run: npm ci
- name: Build documentation
run: npm run docs:build
2024-09-30 02:05:26 -07:00
- name: Deploy Documentation
uses: peaceiris/actions-gh-pages@v4
with:
2024-09-30 02:05:26 -07:00
github_token: ${{ secrets.GITHUB_TOKEN }}
2024-10-02 01:41:09 -07:00
publish_dir: ./docs/.vitepress/dist
2024-09-30 02:05:26 -07:00
allow_empty_commit: true
2024-10-02 01:41:40 -07:00
keep_files: true
force_orphan: false