diff --git a/.github/workflows/test-env-cleanup.yml b/.github/workflows/test-env-cleanup.yml index b4832c83b..602b83229 100644 --- a/.github/workflows/test-env-cleanup.yml +++ b/.github/workflows/test-env-cleanup.yml @@ -10,11 +10,12 @@ jobs: cleanup: runs-on: ubuntu-latest steps: - - uses: rlespinasse/github-slug-action@2.0.0 + - uses: rlespinasse/github-slug-action@3.1.0 - name: Set domain + id: set-domain # Set test instance domain based on branch name slug run: | - echo "::set-env name=domain::${{ env.GITHUB_HEAD_REF_SLUG_URL }}.dashboard.saleor.rocks" + echo "::set-output name=domain::${{ env.GITHUB_HEAD_REF_SLUG_URL }}.dashboard.saleor.rocks" - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 @@ -24,10 +25,10 @@ jobs: aws-region: ${{ secrets.AWS_DEFAULT_REGION }} - name: Remove S3 directory - run: aws s3 rm --recursive s3://${{ secrets.AWS_TEST_DEPLOYMENT_BUCKET }}/${{ env.domain }}/ + run: aws s3 rm --recursive s3://${{ secrets.AWS_TEST_DEPLOYMENT_BUCKET }}/${{ steps.set-domain.outputs.domain }}/ - name: Invalidate cache - run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_TEST_CF_DIST_ID }} --paths "/${{ env.domain }}/*" + run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_TEST_CF_DIST_ID }} --paths "/${{ steps.set-domain.outputs.domain }}/*" - name: Mark deployment as deactivated uses: bobheadxi/deployments@v0.4.2 diff --git a/.github/workflows/test-env-deploy.yml b/.github/workflows/test-env-deploy.yml index 8e095ff5e..45a364c84 100644 --- a/.github/workflows/test-env-deploy.yml +++ b/.github/workflows/test-env-deploy.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: rlespinasse/github-slug-action@2.0.0 + - uses: rlespinasse/github-slug-action@3.1.0 - name: Start deployment uses: bobheadxi/deployments@v0.4.2 @@ -74,9 +74,10 @@ jobs: npm run build-storybook - name: Set domain + id: set-domain # Set test instance domain based on branch name slug run: | - echo "::set-env name=domain::${{ env.GITHUB_HEAD_REF_SLUG_URL }}.dashboard.saleor.rocks" + echo "::set-output name=domain::${{ env.GITHUB_HEAD_REF_SLUG_URL }}.dashboard.saleor.rocks" - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 @@ -87,8 +88,8 @@ jobs: - name: Deploy to S3 run: | - aws s3 sync ./build/dashboard s3://${{ secrets.AWS_TEST_DEPLOYMENT_BUCKET }}/${{ env.domain }} - aws s3 sync ./build/storybook s3://${{ secrets.AWS_TEST_DEPLOYMENT_BUCKET }}/${{ env.domain }}/storybook + aws s3 sync ./build/dashboard s3://${{ secrets.AWS_TEST_DEPLOYMENT_BUCKET }}/${{ steps.set-domain.outputs.domain }} + aws s3 sync ./build/storybook s3://${{ secrets.AWS_TEST_DEPLOYMENT_BUCKET }}/${{ steps.set-domain.outputs.domain }}/storybook - name: Invalidate cache run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_TEST_CF_DIST_ID }} --paths "/${{ env.domain }}/*" @@ -100,7 +101,7 @@ jobs: step: finish token: ${{ secrets.GITHUB_TOKEN }} status: ${{ job.status }} - env_url: https://${{ env.domain }}/ + env_url: https://${{ steps.set-domain.outputs.domain }}/ deployment_id: ${{ steps.deployment.outputs.deployment_id }} - name: Update storybook deployment status @@ -110,5 +111,5 @@ jobs: step: finish token: ${{ secrets.GITHUB_TOKEN }} status: ${{ job.status }} - env_url: https://${{ env.domain }}/storybook/index.html + env_url: https://${{ steps.set-domain.outputs.domain }}/storybook/index.html deployment_id: ${{ steps.storybook-deployment.outputs.deployment_id }}