Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seperate out phpdoc to docker based action #1763

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"phpmailer/phpmailer": "^6.5"
},
"require-dev": {
"phpunit/phpunit": "9.*",
"phpdocumentor/phpdocumentor": "3.*"
"phpunit/phpunit": "9.*"
},
"config": {
"platform": {
Expand Down
Loading
Loading