From 82f7f2ca0c32e0ac0ae6109f09b56b545523a4b0 Mon Sep 17 00:00:00 2001 From: Cal <35017184+CallumWalley@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:35:39 +1200 Subject: [PATCH] Update demo_deploy.yml to work with updated workflow Signed-off-by: Cal <35017184+CallumWalley@users.noreply.github.com> --- .github/workflows/demo_deploy.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/demo_deploy.yml b/.github/workflows/demo_deploy.yml index b07c990d1..c036c7847 100644 --- a/.github/workflows/demo_deploy.yml +++ b/.github/workflows/demo_deploy.yml @@ -25,11 +25,11 @@ jobs: -H "Authorization: Bearer ${{ secrets.PAT }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/${TARGET_OWNER}/${TARGET_REPO}/dispatches \ - -d '{"event_type":"deploy","client_payload":{"pr-branches":"${{ github.event.pull_request.head.ref }}", "use-cache":"true"}}' + -d "{\"event_type\":\"deploy\",\"client_payload\":{\"targets\":\"${GITHUB_REPOSITORY}:${HEAD}\", \"use-cache\":\"true\"}}" - name: Wait for Workflow Action run: | # Just give a minute or so to deploy - # sleep 90 + sleep 60 # curl -L \ # -X POST \ # -H "Accept: application/vnd.github+json" \ @@ -42,7 +42,7 @@ jobs: fetch-depth: 0 - name: Post messages open requests run: | - msg="Test deployment available at ${DEPLOY_URL}/${HEAD}" + msg="Test deployment available at ${DEPLOY_URL}/${GITHUB_REPOSITORY}/${HEAD}" changed_pages="$(git diff --name-only origin/main -- '*.md')" # Logic for truncating out long sections commented out. # maxlines=-5 @@ -52,7 +52,7 @@ jobs: # maxlines=((maxlines+1)) #if [ ${maxlines} -lt 1 ]; then g=${f#*/}; h=${g%.*} - msg="${msg}
  • ${h##*/}
  • " + msg="${msg}
  • ${h##*/}
  • " #fi done # if [ ${maxlines} -gt 0 ];then @@ -62,4 +62,4 @@ jobs: fi msg="${msg}
    Test site may take a minute or so to deploy after PR Open or Update." (gh pr comment ${HEAD} --edit-last --body "${msg}") || (gh pr comment ${HEAD} --body "${msg}") - echo "::info title=Deploy successful::${DEPLOY_URL}/${HEAD}" + echo "::info title=Deploy successful::${DEPLOY_URL}/${GITHUB_REPOSITORY}/${HEAD}"