Skip to content

Commit 07f5ab3

Browse files
committed
ci: make docpublish safer
Signed-off-by: Kari Hamalainen <kari.hamalainen@nordicsemi.no>
1 parent fb20504 commit 07f5ab3

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

.github/workflows/docpublish.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
echo "OUTDIR=$OUTDIR" >> "$GITHUB_ENV"
2929
unzip legacy-ncs*.zip -d $OUTDIR
3030
find "$OUTDIR" -type l -delete
31+
echo "what is head: ${{ github.event.workflow_run.head_branch }}"
3132
3233
- name: Obtain PR number
3334
working-directory: docs
@@ -37,22 +38,16 @@ jobs:
3738
fi
3839
printf 'PR=%s\n' "$PR" >> "$GITHUB_ENV"
3940
40-
- name: Upload to Azure storage
41-
working-directory: docs
42-
env:
43-
AZCOPY_CONCURRENCY_VALUE: 1024
44-
run: |
45-
azcopy cp $OUTDIR "${{ vars.NCS_DOC_STORAGE_URL }}?${{ secrets.NCS_DOC_SAS}}" --recursive=true
41+
# - name: Upload to Azure storage
42+
# working-directory: docs
43+
# env:
44+
# AZCOPY_CONCURRENCY_VALUE: 1024
45+
# run: |
46+
# azcopy cp $OUTDIR "${{ vars.NCS_DOC_STORAGE_URL }}?${{ secrets.NCS_DOC_SAS}}" --recursive=true
4647

4748
- name: Upload Zoomin documentation
49+
if: ${{ github.event.workflow_run.head_branch == 'main' }}
4850
run: |
49-
for file in docs/monitor*.txt; do
50-
if ! grep -q main ${file}; then
51-
echo "Not targeting main, skipping Zoomin upload"
52-
exit 0
53-
fi
54-
done
55-
5651
# trust server
5752
mkdir -p ~/.ssh
5853
ssh-keyscan upload-v1.zoominsoftware.io >> ~/.ssh/known_hosts

0 commit comments

Comments
 (0)