Skip to content

[Add] apigen helper script to run dockerized ApiGen, (#738) #23

[Add] apigen helper script to run dockerized ApiGen, (#738)

[Add] apigen helper script to run dockerized ApiGen, (#738) #23

Workflow file for this run

name: Documentation
on:
workflow_dispatch:
push:
branches:
- v3
jobs:
apigen:
runs-on: ubuntu-22.04
name: ApiGen
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Run ApiGen
run: bin/apigen
- name: Upload ApiGen output artifact
# Require non local GitHub Actions Runner & the projects default branch
if: env.ACT != 'true' && ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
uses: actions/upload-artifact@v4
with:
name: apigen
path: build/apigen
pages:
runs-on: ubuntu-22.04
name: GitHub Pages
# Require non local GitHub Actions Runner & the projects default branch
if: env.ACT != 'true' && ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
steps:
- name: Checkout GitHub Pages
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: gh-pages
- name: Remove old ApiGen
run: rm -r api
- name: Download current ApiGen
uses: actions/download-artifact@v4
with:
name: apigen
path: api
- name: Download current README
uses: actions/checkout@v4
with:
sparse-checkout: |
README.md
sparse-checkout-cone-mode: false
- name: Update GitHub Pages index from README
run: mv README.md index.md
- name: Commit & Push GitHub Pages
uses: EndBug/add-and-commit@v9
with:
default_author: github_actor
message: 'Regenerated ApiGen documentation.'
cwd: gh-pages