34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
name: Generate and Deploy Documentation
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master, develop, develop-qwrk ] # Trigger on push to these branches
|
|
workflow_dispatch: # Allow manual triggering
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # Fetch all history for proper versioning
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16'
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Generate documentation
|
|
run: node scripts/generate-docs.js
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
branch: gh-pages # The branch the action should deploy to
|
|
folder: docs # The folder the action should deploy
|
|
clean: true # Automatically remove deleted files from the deploy branch |