Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .github/workflows/doc-build-and-publish-zoomin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Documentation Build and Publish to Zoomin

on:
workflow_dispatch:
inputs:
documentation_tag:
type: string
required: false
default: "latest"
description: "Label of the documentation"
publish_to_prod:
type: boolean
default: true
publish_to_dev:
type: boolean
default: true

workflow_call:
inputs:
documentation_tag:
type: string
required: true
default: "latest"
publish_to_prod:
type: boolean
default: true
publish_to_dev:
type: boolean
default: true

env:
DOXYGEN_VERSION: 1.12.0

jobs:
doc-build-and-publish:
env:
ARCHIVE: "addon-serial_modem-${{inputs.documentation_tag}}.zip"

runs-on: ubuntu-latest

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip

- name: Install Python dependencies
working-directory: doc
run: |
python3 -m pip install -r requirements.txt

- name: Install Doxygen
run: |
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH

- name: Build documentation
working-directory: doc
run: |
doxygen
sphinx-build -M html . build

cp custom.properties build/html
sed -i 's/__VERSION__/'"${{inputs.documentation_tag}}"'/g' build/html/custom.properties

cp tags.yml build/html
sed -i 's/__VERSION__/'"${{inputs.documentation_tag}}"'/g' build/html/tags.yml

cd build/html

zip -rq "${{env.ARCHIVE}}" .
ls -lah .

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: doc-build
if-no-files-found: error
retention-days: 2
path: |
doc/build/html/${{env.ARCHIVE}}

- name: Prepare Key
run: |
mkdir -p ~/.ssh
ssh-keyscan upload-v1.zoominsoftware.io >> ~/.ssh/known_hosts

echo "${{ secrets.ZOOMIN_KEY }}" > zoomin_key
chmod 600 zoomin_key

- name: Publish documentation - prod
if: ${{inputs.publish_to_prod}}
run: |
sftp -v -i zoomin_key nordic@upload-v1.zoominsoftware.io <<EOF
cd docs-be.nordicsemi.com/sphinx-html/incoming
put doc/build/html/${{env.ARCHIVE}}
EOF

- name: Publish documentation - dev
if: ${{inputs.publish_to_dev}}
run: |
sftp -v -i zoomin_key nordic@upload-v1.zoominsoftware.io <<EOF
cd nordic-be-dev.zoominsoftware.io/sphinx-html/incoming
put doc/build/html/${{env.ARCHIVE}}
EOF
148 changes: 0 additions & 148 deletions .github/workflows/doc-build.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/doc-publish.yml

This file was deleted.

5 changes: 0 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_ncs_theme'
html_theme_options = {
'docsets': {},
}

html_extra_path = ['versions.json']

## -- Options for Breathe ----------------------------------------------------
# https://breathe.readthedocs.io/en/latest/index.html
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Sphinx==5.3.0
breathe==4.35.0
sphinx-ncs-theme<1.1
sphinx-ncs-theme==0.7.4
sphinx-tabs>=3.4
sphinx-togglebutton>=0.3.2
Pillow>=9.0.1
7 changes: 0 additions & 7 deletions doc/versions.json

This file was deleted.

Loading