From 9148c4095222a623bbe8a5d3d41565c1ff26d600 Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Tue, 13 Feb 2024 11:10:07 +0100 Subject: [PATCH] Docs - Add PHPDoc --- .github/workflows/docs.yml | 59 +++++++++++++++++++++++++++++++++----- Makefile | 3 ++ docs/index.html | 23 +++++++++++++++ docs/phpdoc.xml | 20 +++++++++++++ 4 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 docs/index.html create mode 100644 docs/phpdoc.xml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4d25f368b2..8ed28e1717 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,19 +27,60 @@ jobs: - uses: actions/setup-node@v4 - - name: Building docs + - name: Building JS docs run: make js-doc - - name: Setup Pages - uses: actions/configure-pages@v4 + - uses: actions/upload-artifact@master + with: + name: js + path: docs/js/assets/1.0.0/ + + phpdoc: + name: "🐘 PHP-Doc" + if: github.repository == '3liz/lizmap-web-client' && github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + + - name: Check out repository + uses: actions/checkout@v4 + + - name: Building PHP docs + run: make php-doc + + - uses: actions/upload-artifact@master + with: + name: php + path: docs/php + + deploy: + needs: [ jsdoc, phpdoc ] + name: "📤 Deploy" + if: github.repository == '3liz/lizmap-web-client' && github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + + - name: Check out repository + uses: actions/checkout@v4 + + - uses: actions/download-artifact@master + with: + name: php + path: docs/php/ + + - uses: actions/download-artifact@master + with: + name: js + path: docs/js/ - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: docs/js/assets/1.0.0/ + path: docs/ + + - name: Setup Pages + uses: actions/configure-pages@v4 - name: Deploy to GitHub Pages - if: github.repository == '3liz/lizmap-web-client' && github.ref == 'refs/heads/master' id: deployment uses: actions/deploy-pages@v4 @@ -64,5 +105,9 @@ jobs: # ./node_modules/.bin/gh-pages-multi deploy -s docs/js/assets/1.0.0/ -t $BRANCH_NAME -v - name: Summary - if: github.repository == '3liz/lizmap-web-client' && github.ref == 'refs/heads/master' - run: echo "### Published ! :rocket:" >> $GITHUB_STEP_SUMMARY + run: | + echo " + ### Published ! :rocket: + + [Visit the doc](https://docs.3liz.org/lizmap-web-client/) + " >> $GITHUB_STEP_SUMMARY diff --git a/Makefile b/Makefile index 7eb9f41144..6bbb62210f 100644 --- a/Makefile +++ b/Makefile @@ -208,6 +208,9 @@ saas_deploy_snap: saas_release: check-release saas_release_lizmap stable $(SAAS_LIZMAP_VERSION) $(GENERIC_PACKAGE_PATH) +php-doc: + docker run --rm -v ${PWD}:/data phpdoc/phpdoc:3 -c docs/phpdoc.xml + js-doc: rm -rf docs/js npx jsdoc -c docs/jsdoc.json diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000000..94b96bc9cd --- /dev/null +++ b/docs/index.html @@ -0,0 +1,23 @@ + + + +API documentation + + + +
+

API documentation

+
+ +
+

Lizmap Web Client

+

API documentation

+ +
+ + diff --git a/docs/phpdoc.xml b/docs/phpdoc.xml new file mode 100644 index 0000000000..f9b9cfec93 --- /dev/null +++ b/docs/phpdoc.xml @@ -0,0 +1,20 @@ + + + Lizmap Web Client Master + + php + .build/cache + + + + + modules + + + +