Skip to content

Commit ef45232

Browse files
divipillaitrantanen
authored andcommitted
doc: revert Azure doc workflow
Revert Azure doc workflow. Signed-off-by: divya pillai <divya.pillai@nordicsemi.no>
1 parent a09f4fe commit ef45232

6 files changed

Lines changed: 117 additions & 218 deletions

File tree

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Documentation Build and Publish to Zoomin
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
documentation_tag:
7+
type: string
8+
required: false
9+
default: "latest"
10+
description: "Label of the documentation"
11+
publish_to_prod:
12+
type: boolean
13+
default: true
14+
publish_to_dev:
15+
type: boolean
16+
default: true
17+
18+
workflow_call:
19+
inputs:
20+
documentation_tag:
21+
type: string
22+
required: true
23+
default: "latest"
24+
publish_to_prod:
25+
type: boolean
26+
default: true
27+
publish_to_dev:
28+
type: boolean
29+
default: true
30+
31+
env:
32+
DOXYGEN_VERSION: 1.12.0
33+
34+
jobs:
35+
doc-build-and-publish:
36+
env:
37+
ARCHIVE: "addon-serial_modem-${{inputs.documentation_tag}}.zip"
38+
39+
runs-on: ubuntu-latest
40+
41+
concurrency:
42+
group: ${{ github.workflow }}-${{ github.ref }}
43+
cancel-in-progress: true
44+
45+
permissions:
46+
contents: write
47+
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
52+
- name: Install dependencies
53+
run: |
54+
sudo apt-get update
55+
sudo apt-get install -y python3 python3-pip
56+
57+
- name: Install Python dependencies
58+
working-directory: doc
59+
run: |
60+
python3 -m pip install -r requirements.txt
61+
62+
- name: Install Doxygen
63+
run: |
64+
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
65+
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
66+
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
67+
68+
- name: Build documentation
69+
working-directory: doc
70+
run: |
71+
doxygen
72+
sphinx-build -M html . build
73+
74+
cp custom.properties build/html
75+
sed -i 's/__VERSION__/'"${{inputs.documentation_tag}}"'/g' build/html/custom.properties
76+
77+
cp tags.yml build/html
78+
sed -i 's/__VERSION__/'"${{inputs.documentation_tag}}"'/g' build/html/tags.yml
79+
80+
cd build/html
81+
82+
zip -rq "${{env.ARCHIVE}}" .
83+
ls -lah .
84+
85+
- name: Upload artifact
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: doc-build
89+
if-no-files-found: error
90+
retention-days: 2
91+
path: |
92+
doc/build/html/${{env.ARCHIVE}}
93+
94+
- name: Prepare Key
95+
run: |
96+
mkdir -p ~/.ssh
97+
ssh-keyscan upload-v1.zoominsoftware.io >> ~/.ssh/known_hosts
98+
99+
echo "${{ secrets.ZOOMIN_KEY }}" > zoomin_key
100+
chmod 600 zoomin_key
101+
102+
- name: Publish documentation - prod
103+
if: ${{inputs.publish_to_prod}}
104+
run: |
105+
sftp -v -i zoomin_key nordic@upload-v1.zoominsoftware.io <<EOF
106+
cd docs-be.nordicsemi.com/sphinx-html/incoming
107+
put doc/build/html/${{env.ARCHIVE}}
108+
EOF
109+
110+
- name: Publish documentation - dev
111+
if: ${{inputs.publish_to_dev}}
112+
run: |
113+
sftp -v -i zoomin_key nordic@upload-v1.zoominsoftware.io <<EOF
114+
cd nordic-be-dev.zoominsoftware.io/sphinx-html/incoming
115+
put doc/build/html/${{env.ARCHIVE}}
116+
EOF

.github/workflows/doc-build.yml

Lines changed: 0 additions & 148 deletions
This file was deleted.

.github/workflows/doc-publish.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

doc/conf.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
3737

3838
html_theme = 'sphinx_ncs_theme'
39-
html_theme_options = {
40-
'docsets': {},
41-
}
42-
43-
html_extra_path = ['versions.json']
4439

4540
## -- Options for Breathe ----------------------------------------------------
4641
# https://breathe.readthedocs.io/en/latest/index.html

doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Sphinx==5.3.0
22
breathe==4.35.0
3-
sphinx-ncs-theme<1.1
3+
sphinx-ncs-theme==0.7.4
44
sphinx-tabs>=3.4
55
sphinx-togglebutton>=0.3.2
66
Pillow>=9.0.1

doc/versions.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)