From 12077bf69f8840160093f9fd156467b5b2deab6d Mon Sep 17 00:00:00 2001 From: winkaeter <55712954+winkaeter@users.noreply.github.com> Date: Tue, 27 Jan 2026 18:51:40 +0100 Subject: [PATCH 1/2] Add GitHub Actions workflow for documentation generation --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d2d007f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: Generate Documentation + +on: + push: + branches: + - main + +jobs: + phpdoc: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: phpdoc # Installe automatiquement phpDocumentor + + - name: Run phpDocumentor + run: phpdoc -d ./src -t ./docs/api + # -d : dossier source + # -t : dossier de destination pour la doc générée + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/api From be51f2ef71fb124d5841788fe97ac960446f14c6 Mon Sep 17 00:00:00 2001 From: winkaeter <55712954+winkaeter@users.noreply.github.com> Date: Tue, 27 Jan 2026 18:53:59 +0100 Subject: [PATCH 2/2] Add documentation upload step to workflow Add step to upload generated PHP documentation as an artifact. --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2d007f..75ad9a6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,3 +29,9 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/api + + - name: Upload Documentation + uses: actions/upload-artifact@v4 + with: + name: php-doc-api + path: ./docs/api # Le dossier où phpDoc a généré l'HTML