-
-
Notifications
You must be signed in to change notification settings - Fork 146
131 lines (107 loc) · 3.06 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: 📖 Documentation
on:
push:
# tags:
# - '*'
branches:
- master
pull_request:
branches:
- master
- release_3_*
workflow_dispatch:
permissions:
id-token: write
pages: write
jobs:
jsdoc:
name: "🟨 JS-Doc"
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 21
- name: Change tokens about versions
run: |
make version-doc
echo "FULL_VERSION=${FULL_VERSION}" >> $GITHUB_ENV
- name: Building JS docs
run: |
make js-doc
- name: Upload JS artifacts
uses: actions/upload-artifact@master
with:
name: js
path: docs/js/assets/${{ env.FULL_VERSION }}
phpdoc:
name: "🐘 PHP-Doc"
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Change tokens about versions
run: make version-doc
- name: Building PHP docs
run: make php-doc
- name: Upload PHP artifacts
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
- name: Change tokens about versions
run: make version-doc
- name: Download PHP artifacts
uses: actions/download-artifact@master
with:
name: php
path: docs/php/
- name: Download JS artifacts
uses: actions/download-artifact@master
with:
name: js
path: docs/js/
- name: Upload all docs artifacts
uses: actions/upload-pages-artifact@v3
with:
path: docs/
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# - name: Branch name
# id: branch-name
# run: make debug | grep SHORT_VERSION= >> "$GITHUB_OUTPUT"
#
# - name: Install multi deploy version
# run: npm i @koumoul/gh-pages-multi
#
# - name: Token
# env:
# GITHUB_TOKEN: ${{ secrets.TOKEN_TEST }}
# run: git remote set-url origin https://${{ secrets.TOKEN_TEST }}@github.com/Gustry/lizmap-web-client.git
#
# - name: Deploy build
# env:
# BRANCH_NAME: ${{ steps.branch-name.outputs.SHORT_VERSION }}
# run: |
# git config --global user.name "Bot"
# git config --global user.email "[email protected]"
# ./node_modules/.bin/gh-pages-multi deploy -s docs/js/assets/1.0.0/ -t $BRANCH_NAME -v
- name: Summary
run: |
echo "
### Published ! :rocket:
[Visit the doc](https://docs.3liz.org/lizmap-web-client/)
" >> $GITHUB_STEP_SUMMARY