diff --git a/.github/actions/publish_website/action.yml b/.github/actions/publish_website/action.yml index 6efd122..e7f546f 100644 --- a/.github/actions/publish_website/action.yml +++ b/.github/actions/publish_website/action.yml @@ -1,7 +1,7 @@ name: 'Publish Website to Webflow' description: 'Map site labels to site IDs and deploy to Webflow' inputs: - site_label_staging_webflow: + site_label_staging: description: 'Publish to staging.deriv.com' required: true default: 'false' @@ -24,8 +24,8 @@ inputs: webflow_api_token: description: 'Webflow API Token' required: true - staging_webflow_site_id: - description: 'Staging Webflow Site ID' + staging_site_id: + description: 'Staging Site ID' required: true webflow_site_id: description: 'Webflow Site ID' @@ -55,7 +55,7 @@ runs: run: | SITES_TO_PUBLISH=() SITES_DEPLOY_IDS=() - if [ "${{ inputs.site_label_staging_webflow }}" == "true" ]; then + if [ "${{ inputs.site_label_staging }}" == "true" ]; then SITES_TO_PUBLISH+=("\"staging.deriv.com\"") SITES_DEPLOY_IDS+=("\"${{ inputs.staging_site_id }}\"") fi diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index cb9a9f1..33cd944 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -3,7 +3,7 @@ name: Publish website and Upload sitemap and robots on: workflow_dispatch: inputs: - site_label_staging_webflow: + site_label_staging: type: boolean description: "staging.deriv.com" default: false @@ -40,13 +40,13 @@ jobs: id: publish uses: ./.github/actions/publish_website with: - site_label_staging_webflow: ${{ github.event.inputs.site_label_staging_webflow }} + site_label_staging: ${{ github.event.inputs.site_label_staging }} site_label_webflow: ${{ github.event.inputs.site_label_webflow }} site_label_deriv_com: ${{ github.event.inputs.site_label_deriv_com }} site_label_deriv_me: ${{ github.event.inputs.site_label_deriv_me }} site_label_deriv_be: ${{ github.event.inputs.site_label_deriv_be }} webflow_api_token: ${{ secrets.WEBFLOW_API_TOKEN }} - staging_webflow_site_id: ${{ secrets.STAGING_WEBFLOW_SITE_ID }} + staging_site_id: ${{ secrets.STAGING_SITE_ID }} webflow_site_id: ${{ secrets.WEBFLOW_SITE_ID }} deriv_com_site_id: ${{ secrets.DERIV_COM_SITE_ID }} deriv_me_site_id: ${{ secrets.DERIV_ME_SITE_ID }} @@ -76,7 +76,7 @@ jobs: generate_sitemap_and_robots: runs-on: ubuntu-latest needs: publish_site - if: ${{ needs.publish_site.result == 'success' && (github.event.inputs.site_label_staging_webflow == 'true' || github.event.inputs.site_label_webflow == 'true' || github.event.inputs.site_label_deriv_com == 'true' || github.event.inputs.site_label_deriv_me == 'true' || github.event.inputs.site_label_deriv_be == 'true') }} + if: ${{ needs.publish_site.result == 'success' && (github.event.inputs.site_label_webflow == 'true' || github.event.inputs.site_label_deriv_com == 'true' || github.event.inputs.site_label_deriv_me == 'true' || github.event.inputs.site_label_deriv_be == 'true') }} steps: - name: Checkout code uses: actions/checkout@v4