Skip to content

Commit 3c846a6

Browse files
committed
add documentation action
1 parent cee4032 commit 3c846a6

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

.github/workflows/static.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static master branch content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["master"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: true
22+
23+
jobs:
24+
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
runs-on: ubuntu-latest
30+
steps:
31+
32+
- name: Checkout master
33+
uses: actions/checkout@v4
34+
with:
35+
ref: master
36+
37+
- name: "Setting up npm"
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 20
41+
42+
- name: Install build dependencies
43+
run: |
44+
npm install [email protected] -g
45+
npm install @jsdoc/[email protected] -g
46+
47+
- name: Restore previous github-pages artifact
48+
run: |
49+
wget https://geonode.org/geonode-mapstore-client/artifact.zip
50+
unzip artifact.zip
51+
mv gh-pages/ ../gh-pages
52+
53+
- name: Build master documentation
54+
run: |
55+
cd ./geonode_mapstore_client/client/
56+
npm run docs
57+
cd ../../
58+
cp -a ./geonode_mapstore_client/static/fonts/. ./docs/fonts/
59+
rm -rf ../gh-pages/master
60+
mv ./docs ../gh-pages/master
61+
cd ../
62+
zip -r artifact.zip gh-pages/
63+
mv artifact.zip gh-pages/artifact.zip
64+
65+
- name: Setup Pages
66+
uses: actions/configure-pages@v2
67+
68+
- name: Upload artifact
69+
uses: actions/upload-pages-artifact@v3
70+
with:
71+
# Upload entire repository
72+
name: github-pages
73+
path: '../gh-pages'
74+
75+
- name: Deploy to GitHub Pages
76+
id: deployment
77+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)