Skip to content

ApiGen

ApiGen #24

Workflow file for this run

name: ApiGen
on:
workflow_run:
workflows: ["Unit Tests"]
branches: [master]
types:
- completed
jobs:
Document_Generator:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
- name: Download phpDocumentor
run: |
curl -fsSL -o phpDocumentor.phar https://phpdoc.org/phpDocumentor.phar
chmod +x phpDocumentor.phar
- name: Generate API docs
run: php phpDocumentor.phar -d src -t docs --no-interaction
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'Docs updated by GitHub Actions'