From 76ee003760d0520cd9f81bde3dcf31db9a67d0b5 Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Mon, 9 Dec 2024 20:26:51 +0530 Subject: [PATCH] Fix doc build on main Signed-off-by: Chaitanya Tata --- .github/workflows/docbuild.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docbuild.yml b/.github/workflows/docbuild.yml index f050ada..5982bb7 100644 --- a/.github/workflows/docbuild.yml +++ b/.github/workflows/docbuild.yml @@ -64,20 +64,20 @@ jobs: 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 + 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 [[ "${{ github.ref }}" == "refs/heads/main" ]]; then + ARCHIVE="nrf70-bm-docs-main-$${{ github.sha }}.zip" + echo "publish2 main ${ARCHIVE}" > "${MONITOR}" + else + echo "Neither PR nor main branch, exiting" + exit 0 + fi fi - ARCHIVE="nrf70-bm-docs-${VERSION}.zip" - echo "publish2 main ${VERSION} ${ARCHIVE}" > "${MONITOR}" - fi - cd docs/build/html zip -rq "${ARCHIVE}" . mv "${ARCHIVE}" ../../../