-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This should generate docs using the script and is based on NCS docbuild. Signed-off-by: Chaitanya Tata <[email protected]>
- Loading branch information
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Documentation Build | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- main | ||
- 'v*-branch' | ||
push: | ||
branches: | ||
- main | ||
- 'v*-branch' | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Checkout sources | ||
uses: nrfconnect/action-checkout-west-update@main | ||
|
||
- name: cache-pip | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-doc-pip | ||
|
||
- name: Install packages | ||
run: | | ||
sudo apt update | ||
sudo apt-get install -y ninja-build mscgen plantuml | ||
sudo snap install yq | ||
DOXYGEN_VERSION=$(yq ".doxygen.version" ./ncs/nrf70-bm-driver/scripts/tools-versions-linux.yml) | ||
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: Install Python dependencies | ||
working-directory: ncs | ||
run: | | ||
sudo pip3 install -U setuptools wheel pip | ||
pip3 install -r nrf/doc/requirements.txt | ||
- name: West zephyr-export | ||
working-directory: ncs | ||
run: | | ||
west zephyr-export | ||
- name: Build documentation | ||
working-directory: ncs/nrf70-bm-driver | ||
run: | | ||
./build_docs.sh | ||
- name: Prepare legacy upload | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'external') || contains(github.event.pull_request.labels.*.name, 'CI-trusted-author') }} | ||
working-directory: ncs/nrf70-bm-driver | ||
run: | | ||
MONITOR="monitor_${{ github.run_id }}.txt" | ||
# Create documentation upload files | ||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
ARCHIVE="nrf70-bm-docs-${{ github.event.number }}.zip" | ||
echo "publish2 dev PR-${{ github.event.number }} ${ARCHIVE}" > "${MONITOR}" | ||
echo "${{ github.event.number }}" > pr.txt | ||
else | ||
if [ -z "${VERSION}" ]; then | ||
echo "Not a release or latest, skipping publish" | ||
exit 0 | ||
fi | ||
ARCHIVE="nrf70-bm-docs-${VERSION}.zip" | ||
echo "publish2 main ${VERSION} ${ARCHIVE}" > "${MONITOR}" | ||
fi | ||
cd docs/build/html | ||
zip -rq "${ARCHIVE}" . | ||
mv "${ARCHIVE}" ../../../ | ||
- name: Store | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'external') || contains(github.event.pull_request.labels.*.name, 'CI-trusted-author') }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: | | ||
ncs/nrf70-bm-driver/*.zip | ||
ncs/nrf70-bm-driver/monitor*.txt | ||
ncs/nrf70-bm-driver/pr.txt |