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

50 lines
1.1 KiB
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:
2024-09-30 02:26:02 -07:00
node-version: '18' # Updated to Node.js 18
- name: Install dependencies
2024-09-30 02:26:02 -07:00
run: npm ci
working-directory: './docs'
- name: Build documentation
run: npm run docs:build
working-directory: './docs'
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 }}
publish_dir: ./docs/.vuepress/dist
destination_dir: docs
allow_empty_commit: true
keep_files: true
2024-09-30 02:35:51 -07:00
force_orphan: false