Skip to content

Commit 9148c40

Browse files
committed
Docs - Add PHPDoc
1 parent 5b04306 commit 9148c40

File tree

4 files changed

+98
-7
lines changed

4 files changed

+98
-7
lines changed

.github/workflows/docs.yml

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,60 @@ jobs:
2727

2828
- uses: actions/setup-node@v4
2929

30-
- name: Building docs
30+
- name: Building JS docs
3131
run: make js-doc
3232

33-
- name: Setup Pages
34-
uses: actions/configure-pages@v4
33+
- uses: actions/upload-artifact@master
34+
with:
35+
name: js
36+
path: docs/js/assets/1.0.0/
37+
38+
phpdoc:
39+
name: "🐘 PHP-Doc"
40+
if: github.repository == '3liz/lizmap-web-client' && github.ref == 'refs/heads/master'
41+
runs-on: ubuntu-latest
42+
steps:
43+
44+
- name: Check out repository
45+
uses: actions/checkout@v4
46+
47+
- name: Building PHP docs
48+
run: make php-doc
49+
50+
- uses: actions/upload-artifact@master
51+
with:
52+
name: php
53+
path: docs/php
54+
55+
deploy:
56+
needs: [ jsdoc, phpdoc ]
57+
name: "📤 Deploy"
58+
if: github.repository == '3liz/lizmap-web-client' && github.ref == 'refs/heads/master'
59+
runs-on: ubuntu-latest
60+
steps:
61+
62+
- name: Check out repository
63+
uses: actions/checkout@v4
64+
65+
- uses: actions/download-artifact@master
66+
with:
67+
name: php
68+
path: docs/php/
69+
70+
- uses: actions/download-artifact@master
71+
with:
72+
name: js
73+
path: docs/js/
3574

3675
- name: Upload artifact
3776
uses: actions/upload-pages-artifact@v3
3877
with:
39-
path: docs/js/assets/1.0.0/
78+
path: docs/
79+
80+
- name: Setup Pages
81+
uses: actions/configure-pages@v4
4082

4183
- name: Deploy to GitHub Pages
42-
if: github.repository == '3liz/lizmap-web-client' && github.ref == 'refs/heads/master'
4384
id: deployment
4485
uses: actions/deploy-pages@v4
4586

@@ -64,5 +105,9 @@ jobs:
64105
# ./node_modules/.bin/gh-pages-multi deploy -s docs/js/assets/1.0.0/ -t $BRANCH_NAME -v
65106

66107
- name: Summary
67-
if: github.repository == '3liz/lizmap-web-client' && github.ref == 'refs/heads/master'
68-
run: echo "### Published ! :rocket:" >> $GITHUB_STEP_SUMMARY
108+
run: |
109+
echo "
110+
### Published ! :rocket:
111+
112+
[Visit the doc](https://docs.3liz.org/lizmap-web-client/)
113+
" >> $GITHUB_STEP_SUMMARY

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ saas_deploy_snap:
208208
saas_release: check-release
209209
saas_release_lizmap stable $(SAAS_LIZMAP_VERSION) $(GENERIC_PACKAGE_PATH)
210210

211+
php-doc:
212+
docker run --rm -v ${PWD}:/data phpdoc/phpdoc:3 -c docs/phpdoc.xml
213+
211214
js-doc:
212215
rm -rf docs/js
213216
npx jsdoc -c docs/jsdoc.json

docs/index.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<meta charset="utf-8"/>
4+
<title>API documentation</title>
5+
<link rel="stylesheet" href="https://packages.3liz.org/packages.css" />
6+
<body>
7+
8+
<header class="header-container" style="">
9+
<h1>API documentation</h1>
10+
</header>
11+
12+
<article>
13+
<h2>Lizmap Web Client</h2>
14+
<h3>API documentation</h3>
15+
<div class="links">
16+
<ul>
17+
<li><a href="/lizmap-web-client/php">PHP</a></li>
18+
<li><a href="/lizmap-web-client/js">JavaScript</a></li>
19+
</ul>
20+
</div>
21+
</article>
22+
</body>
23+
</html>

docs/phpdoc.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<phpdocumentor
3+
configVersion="3"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns="https://www.phpdoc.org"
6+
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/phpDocumentor/phpDocumentor/master/data/xsd/phpdoc.xsd"
7+
>
8+
<title>Lizmap Web Client Master</title>
9+
<paths>
10+
<output>php</output>
11+
<cache>.build/cache</cache>
12+
</paths>
13+
<version number="master">
14+
<api>
15+
<source dsn="../lizmap/">
16+
<path>modules</path>
17+
</source>
18+
</api>
19+
</version>
20+
</phpdocumentor>

0 commit comments

Comments
 (0)