Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
chore: fixed preview url issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-deriv committed Feb 28, 2024
1 parent 9d18eb3 commit 7893968
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/generate-preview-link-eu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate preview link for eu
name: Generate EU preview link

on:
pull_request_target:
Expand Down Expand Up @@ -117,10 +117,10 @@ jobs:
echo "Deploying build to Cloudflare Pages"
directory='sites/eu/public'
projectName='deriv-com-preview-links'
branch=$(echo "$HEAD_BRANCH" | head -c 20 | sed 's/[\/_\.]/-/g; s/[^a-zA-Z0-9]$/1/')
branch=eutestlink-$(echo "$HEAD_BRANCH" | head -c 20 | sed 's/[\/_\.]/-/g; s/[^a-zA-Z0-9]$/1/')
cf_preview_url=$(wrangler pages deploy $directory --project-name=$projectName --branch=$branch > log.txt 2>&1; echo $?)
echo "------"
preview_url=https://eutestlink-$branch.deriv-com-preview-links.pages.dev
preview_url=https://$branch.deriv-com-preview-links.pages.dev
cat log.txt
if grep -q "Deployment complete" log.txt; then
echo "preview_url=$preview_url" >> "$GITHUB_OUTPUT"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/generate-preview-link-row.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate preview link for ROW (Rest Of the World)
name: Generate ROW preview link

on:
pull_request_target:
Expand Down Expand Up @@ -117,10 +117,10 @@ jobs:
echo "Deploying build to Cloudflare Pages"
directory='sites/row/public'
projectName='deriv-com-preview-links'
branch=$(echo "$HEAD_BRANCH" | head -c 20 | sed 's/[\/_\.]/-/g; s/[^a-zA-Z0-9]$/1/')
branch=rowtestlink-$(echo "$HEAD_BRANCH" | head -c 20 | sed 's/[\/_\.]/-/g; s/[^a-zA-Z0-9]$/1/')
cf_preview_url=$(wrangler pages deploy $directory --project-name=$projectName --branch=$branch > log.txt 2>&1; echo $?)
echo "------"
preview_url=https://row--$branch.deriv-com-preview-links.pages.dev
preview_url=https://$branch.deriv-com-preview-links.pages.dev
cat log.txt
if grep -q "Deployment complete" log.txt; then
echo "preview_url=$preview_url" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 7893968

Please sign in to comment.