From 2d03d81d033d60308237d42fef917b3ee2a14084 Mon Sep 17 00:00:00 2001 From: balakrishna-deriv <56330681+balakrishna-deriv@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:02:54 +0800 Subject: [PATCH] Bala/Fix cf-pages chars limit issue (#5693) * fix: gh-pages chart limit issue * Update .github/workflows/generate-preview-link.yml Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com> --------- Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com> --- .github/workflows/generate-preview-link.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-preview-link.yml b/.github/workflows/generate-preview-link.yml index 02cd4c2a1ac..9bb6250dd26 100644 --- a/.github/workflows/generate-preview-link.yml +++ b/.github/workflows/generate-preview-link.yml @@ -99,7 +99,8 @@ jobs: echo "Deploying build to Cloudflare Pages" directory='public' projectName='deriv-com-preview-links' - branch=${{github.event.workflow_run.head_branch}} + head_branch=${{github.event.workflow_run.head_branch}} + branch=$(echo $head_branch | head -c 20) preview_url=$(wrangler pages deploy $directory --project-name=$projectName --branch=$branch > log.txt 2>&1; echo $?) echo "------" cat log.txt @@ -116,7 +117,7 @@ jobs: with: github-token: ${{ github.token }} script: | - const preview_url = `https://${{github.event.workflow_run.head_branch}}.deriv-com-preview-links.pages.dev` + const preview_url = "${{steps.publish-to-pages.outputs.preview_url}}" const comment = [ `**Preview Link**: ${preview_url}`, '| Name | Result |',