From 8a12906bce9826015e615ec068bd9b2af98689f6 Mon Sep 17 00:00:00 2001 From: tkostuch Date: Tue, 26 May 2020 09:36:10 +0200 Subject: [PATCH 1/3] update workflow --- .github/workflows/deploy-storefrontcloud.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/deploy-storefrontcloud.yml b/.github/workflows/deploy-storefrontcloud.yml index ccc4bb8f29..4aa3d5c642 100644 --- a/.github/workflows/deploy-storefrontcloud.yml +++ b/.github/workflows/deploy-storefrontcloud.yml @@ -36,6 +36,15 @@ jobs: target_url: https://demo.storefrontcloud.io environment: production initial_status: in_progress + - name: Create config file + run: | + if github.ref == 'refs/heads/master'; then + echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://demo.storefrontcloud.io"}}' > config/local-cloud-prod.json + else if contains(github.ref, 'hotfix/v'); then + echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://demo.storefrontcloud.io"}}' > config/local-cloud-prod.json + else if github.ref == 'refs/heads/develop'; then + echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://test.storefrontcloud.io"}}' > config/local-cloud-prod.json + fi - name: Deploy on demo.storefrontcloud.io if: github.ref == 'refs/heads/master' run: | From 19671b1354c4e682d1d6c6ea5c2ef44e867f49d8 Mon Sep 17 00:00:00 2001 From: tkostuch Date: Tue, 26 May 2020 09:55:22 +0200 Subject: [PATCH 2/3] update bash --- .github/workflows/deploy-storefrontcloud.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-storefrontcloud.yml b/.github/workflows/deploy-storefrontcloud.yml index 4aa3d5c642..032b39369f 100644 --- a/.github/workflows/deploy-storefrontcloud.yml +++ b/.github/workflows/deploy-storefrontcloud.yml @@ -38,11 +38,11 @@ jobs: initial_status: in_progress - name: Create config file run: | - if github.ref == 'refs/heads/master'; then + if ${{ github.ref }} == 'refs/heads/master'; then echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://demo.storefrontcloud.io"}}' > config/local-cloud-prod.json - else if contains(github.ref, 'hotfix/v'); then + else if [[ ${{ github.ref }} == "hotfix/v"* ]]; then echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://demo.storefrontcloud.io"}}' > config/local-cloud-prod.json - else if github.ref == 'refs/heads/develop'; then + else if ${{ github.ref }} == 'refs/heads/develop'; then echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://test.storefrontcloud.io"}}' > config/local-cloud-prod.json fi - name: Deploy on demo.storefrontcloud.io From 8769235995a3345a1b1e6b33cd232c8d6e25f1bf Mon Sep 17 00:00:00 2001 From: tkostuch Date: Tue, 26 May 2020 10:38:37 +0200 Subject: [PATCH 3/3] use env specific config --- .github/workflows/deploy-storefrontcloud.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-storefrontcloud.yml b/.github/workflows/deploy-storefrontcloud.yml index 032b39369f..67159a13a6 100644 --- a/.github/workflows/deploy-storefrontcloud.yml +++ b/.github/workflows/deploy-storefrontcloud.yml @@ -38,13 +38,9 @@ jobs: initial_status: in_progress - name: Create config file run: | - if ${{ github.ref }} == 'refs/heads/master'; then - echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://demo.storefrontcloud.io"}}' > config/local-cloud-prod.json - else if [[ ${{ github.ref }} == "hotfix/v"* ]]; then - echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://demo.storefrontcloud.io"}}' > config/local-cloud-prod.json - else if ${{ github.ref }} == 'refs/heads/develop'; then - echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://test.storefrontcloud.io"}}' > config/local-cloud-prod.json - fi + echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://demo.storefrontcloud.io"}}' > config/local-cloud-demo.json + echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://demo.storefrontcloud.io"}}' > config/local-cloud-next.json + echo '{"server":{"useOutputCacheTagging":true,"useOutputCache":true,"dynamicConfigReload":true},"api":{"url":"https://test.storefrontcloud.io"}}' > config/local-cloud-test.json - name: Deploy on demo.storefrontcloud.io if: github.ref == 'refs/heads/master' run: |