@@ -15,58 +15,10 @@ jobs:
1515 runs-on : ubuntu-24.04
1616 if : ${{ github.event.workflow_run.conclusion == 'success' }}
1717 steps :
18- - name : Download artifacts
19- uses : dawidd6 /action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
18+ - name : Publish
19+ uses : nrfconnect /action-docpublish@a272d73b3f083e41287e32068a0e4c3aef622c21
2020 with :
21- workflow : docbuild.yml
22- run_id : ${{ github.event.workflow_run.id }}
23-
24- - name : Unzip html archive
25- working-directory : docs
26- run : |
27- OUTDIR=ncs/$(awk 'NR==1 { if ($3 ~ /^(latest|PR-[0-9]+|[0-9]+\.[0-9a-zA-Z\.\-]+)$/) print $3 }' monitor_*.txt)
28- mkdir -p "$OUTDIR"
29- echo "OUTDIR=$OUTDIR" >> "$GITHUB_ENV"
30- unzip legacy-ncs*.zip -d $OUTDIR
31- find "$OUTDIR" -type l -delete
32-
33- - name : Obtain PR number
34- working-directory : docs
35- run : |
36- if [ -f pr.txt ]; then
37- PR=$(head -n 1 pr.txt | tr -cd '0-9')
38- fi
39- printf 'PR=%s\n' "$PR" >> "$GITHUB_ENV"
40-
41- - name : Upload to Azure storage
42- working-directory : docs
43- env :
44- AZCOPY_CONCURRENCY_VALUE : 1024
45- NCS_DOC_SAS_PRS : ${{ secrets.NCS_DOC_SAS_PRS }}
46- NCS_DOC_SAS_MAIN : ${{ secrets.NCS_DOC_SAS_MAIN }}
47- run : |
48- if [[ "${{ github.event.workflow_run.event }}" == "pull_request" ]]; then
49- NCS_DOC_STORAGE_URL="${{ vars.NCS_DOC_PR_STORAGE_URL }}"
50- azcopy cp ncs "$NCS_DOC_STORAGE_URL?$NCS_DOC_SAS_PRS" --recursive=true
51- else
52- NCS_DOC_STORAGE_URL="${{ vars.NCS_DOC_STORAGE_URL }}"
53- azcopy cp ncs "$NCS_DOC_STORAGE_URL?$NCS_DOC_SAS_MAIN" --recursive=true
54- fi
55-
56- - name : Find Comment
57- uses : peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
58- if : env.PR != ''
59- id : fc
60- with :
61- issue-number : ${{ env.PR }}
62- comment-author : ' github-actions[bot]'
63- body-includes : documentation preview
64-
65- - name : Create or update comment
66- if : env.PR != ''
67- uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
68- with :
69- comment-id : ${{ steps.fc.outputs.comment-id }}
70- issue-number : ${{ env.PR }}
71- body-path : docs/comment.txt
72- edit-mode : replace
21+ storage-url : ${{ vars.NCS_DOC_STORAGE_URL }}
22+ storage-url-pr : ${{ vars.NCS_DOC_PR_STORAGE_URL }}
23+ storage-sas : ${{ secrets.NCS_DOC_SAS_MAIN }}
24+ storage-pr-sas : ${{ secrets.NCS_DOC_SAS_PRS }}
0 commit comments