Generate docs #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate docs | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
docs: | |
name: Generate documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: | |
uses: ./.github/actions/setup-twfy | |
with: | |
php_version: "7.4" | |
- name: Build documentation | |
run: | | |
sudo apt-get update && sudo apt-get install -y graphviz | |
rm -rf docs || exit 0 | |
mkdir docs | |
./vendor/bin/phpdoc | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: docs | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: docs | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
- uses: geekyeggo/delete-artifact@v2 | |
with: | |
name: github-pages |