Skip to content

Commit

Permalink
Seperate out phpdoc to docker based action
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Feb 9, 2024
1 parent 975d462 commit 23238d6
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,4 @@ jobs:
if: matrix.php_version == '7.4'
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- name: Documentation
if: matrix.php_version == '7.4' && github.ref_name == 'master' && github.event_name == 'push'
run: |
sudo apt-get update && sudo apt-get install -y graphviz
./build-docs.sh
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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: Run phpdoc
run: |
docker run --rm -v $(pwd):/data phpdoc/phpdoc:3 -t ./docs
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
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@v4

- uses: geekyeggo/delete-artifact@v2
with:
name: github-pages

0 comments on commit 23238d6

Please sign in to comment.