@@ -145,6 +145,7 @@ jobs:
145145 pull-requests : none
146146 outputs :
147147 deployment_result : ${{ steps.deployment.outputs.result }}
148+ path_prefix : ${{ steps.generate-path-prefix.outputs.result }}
148149 env :
149150 GITHUB_PR_REF_NAME : ${{ github.event.pull_request.head.ref }}
150151 MATCH : ${{ needs.match.outputs.content-source-match }}
@@ -203,6 +204,7 @@ jobs:
203204 return deployment.data.id
204205
205206 - name : Generate env.PATH_PREFIX
207+ id : generate-path-prefix
206208 if : >
207209 env.MATCH == 'true'
208210 && steps.deployment.outputs.result
@@ -212,16 +214,18 @@ jobs:
212214 run : |
213215 case "${GITHUB_EVENT_NAME}" in
214216 "merge_group" | "pull_request" | "pull_request_target")
215- echo "PATH_PREFIX= /${GITHUB_REPOSITORY}/pull/${PR_NUMBER}" >> $GITHUB_ENV
217+ path_prefix=" /${GITHUB_REPOSITORY}/pull/${PR_NUMBER}"
216218 ;;
217219 "push" | "workflow_dispatch")
218- echo "PATH_PREFIX= /${GITHUB_REPOSITORY}/tree/${GITHUB_REF_NAME}" >> $GITHUB_ENV
220+ path_prefix=" /${GITHUB_REPOSITORY}/tree/${GITHUB_REF_NAME}"
219221 ;;
220222 *)
221223 echo "Unsupported event: '${GITHUB_EVENT_NAME}'";
222224 exit 1;
223225 ;;
224226 esac
227+ echo "PATH_PREFIX=${path_prefix}" >> $GITHUB_ENV
228+ echo "result=${path_prefix}" >> $GITHUB_OUTPUT
225229
226230 - name : Bootstrap Action Workspace
227231 if : >
@@ -365,6 +369,7 @@ jobs:
365369 uses : actions/github-script@v7
366370 env :
367371 ALL_CHANGED_FILES : ${{ needs.check.outputs.all_changed_files }}
372+ PATH_PREFIX : ${{ needs.build.outputs.path_prefix }}
368373 with :
369374 script : |
370375 const title = '## 🔍 Preview links for changed docs'
0 commit comments