From d39f592a1e6e333c87af7d33fc2a1216cb2453cf Mon Sep 17 00:00:00 2001 From: Mark Wylde <129744061+markwylde-deriv@users.noreply.github.com> Date: Fri, 19 Apr 2024 16:34:27 +0100 Subject: [PATCH 1/2] chore: use vars for the project name --- .github/workflows/build-and-deploy-staging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-staging.yml b/.github/workflows/build-and-deploy-staging.yml index d06c6529..b03e5fdd 100644 --- a/.github/workflows/build-and-deploy-staging.yml +++ b/.github/workflows/build-and-deploy-staging.yml @@ -56,7 +56,7 @@ jobs: npm i -g wrangler echo "Deploying build to Cloudflare Pages" directory='public' - projectName=${{ secrets.CLOUDFLARE_PROJECT_NAME }} + projectName=${{ vars.CLOUDFLARE_PROJECT_NAME }} branch=$(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 "------" From c89a68337965647ceac8b96497fbd686069c24af Mon Sep 17 00:00:00 2001 From: Mark Wylde <129744061+markwylde-deriv@users.noreply.github.com> Date: Fri, 19 Apr 2024 16:35:07 +0100 Subject: [PATCH 2/2] chore: use vars for cicd --- .github/workflows/build-and-deploy-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-test.yml b/.github/workflows/build-and-deploy-test.yml index 15ef6927..abe9b6d8 100644 --- a/.github/workflows/build-and-deploy-test.yml +++ b/.github/workflows/build-and-deploy-test.yml @@ -89,7 +89,7 @@ jobs: npm i -g wrangler echo "Deploying build to Cloudflare Pages" directory='public' - projectName=${{ secrets.CLOUDFLARE_PROJECT_NAME }} + projectName=${{ vars.CLOUDFLARE_PROJECT_NAME }} branch=$(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 "------"