Skip to content

Commit 05248e2

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

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

.github/workflows/docpublish.yml

Lines changed: 2 additions & 7 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
@@ -45,14 +46,8 @@ jobs:
4546
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)