From 3fc1b8227a762c8e67e311729a7e6e051ae986f2 Mon Sep 17 00:00:00 2001 From: Sandeep Date: Tue, 19 Mar 2024 13:38:08 +0800 Subject: [PATCH] chore: updated workflow --- .github/actions/publish_to_pages/action.yml | 9 +++++++-- .github/workflows/release_staging.yml | 1 + .github/workflows/release_test.yml | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/actions/publish_to_pages/action.yml b/.github/actions/publish_to_pages/action.yml index 7279fb0a..736bfe22 100644 --- a/.github/actions/publish_to_pages/action.yml +++ b/.github/actions/publish_to_pages/action.yml @@ -10,6 +10,9 @@ inputs: CF_BRANCH: description: Cloudflare branch required: true + PROJECT_NAME: + description: Cloudflare project name + required: true runs: using: composite steps: @@ -17,9 +20,11 @@ runs: env: CLOUDFLARE_ACCOUNT_ID: ${{ inputs.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ inputs.CLOUDFLARE_API_TOKEN }} + CF_BRANCH: ${{ inputs.CF_BRANCH }} + PROJECT_NAME: ${{ inputs.PROJECT_NAME }} run: |- npm i wrangler@3.10.1 cd build - npx wrangler pages deploy . --project-name=deriv-developers-portal-pages --branch=${{ inputs.CF_BRANCH }} - echo "New staging website - https://staging-api.deriv.com/" + npx wrangler pages deploy . --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.CF_BRANCH }} + echo "New staging website - https://${{ env.CF_BRANCH }}-api.deriv.com/" shell: bash diff --git a/.github/workflows/release_staging.yml b/.github/workflows/release_staging.yml index 920727be..f5e782c1 100644 --- a/.github/workflows/release_staging.yml +++ b/.github/workflows/release_staging.yml @@ -32,6 +32,7 @@ jobs: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CF_BRANCH: staging + PROJECT_NAME: deriv-developers-portal-pages - name: Publish to Docker uses: ./.github/actions/publish_to_docker with: diff --git a/.github/workflows/release_test.yml b/.github/workflows/release_test.yml index 69896571..9dd224eb 100644 --- a/.github/workflows/release_test.yml +++ b/.github/workflows/release_test.yml @@ -40,3 +40,4 @@ jobs: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CF_BRANCH: test + PROJECT_NAME: deriv-developers-portal-test-pages