@@ -2,12 +2,8 @@ name: Deploy to Demo and Test
22on :
33 push :
44 branches :
5- - test
6- - demo
7- pull_request :
8- branches :
9- - test
10- - demo
5+ - master
6+ - develop
117
128jobs :
139 build :
2218
2319 # Build for demo
2420 - name : Build and publish demo docker image
25- if : github.ref == 'refs/heads/demo '
21+ if : github.ref == 'refs/heads/master '
2622 uses : elgohr/Publish-Docker-Github-Action@master
2723 with :
2824 name : demo-storefrontcloud-io/vue-storefront-api:${{ github.sha }}
3430
3531 # Build for test
3632 - name : Build and publish test docker image
37- if : github.ref == 'refs/heads/test '
33+ if : github.ref == 'refs/heads/develop '
3834 uses : elgohr/Publish-Docker-Github-Action@master
3935 with :
4036 name : test-storefrontcloud-io/vue-storefront-api:${{ github.sha }}
5046 steps :
5147 - uses : chrnorm/deployment-action@releases/v1
5248 name : Create GitHub deployment for ${GITHUB_REF##*/}
53- if : github.ref == 'refs/heads/main ' || github.ref == 'refs/heads/test '
49+ if : github.ref == 'refs/heads/master ' || github.ref == 'refs/heads/develop '
5450 id : deployment
5551 with :
5652 token : " ${{ github.token }}"
6056
6157 # Deploy on test/demo depending on the branch that triggered the workflow
6258 - name : Deploy on ${GITHUB_REF##*/}.europe-west1.gcp.storefrontcloud.io
63- if : github.ref == 'refs/heads/main ' || github.ref == 'refs/heads/test '
59+ if : github.ref == 'refs/heads/master ' || github.ref == 'refs/heads/develop '
6460 run : |
6561 if curl -s -H 'X-User-Id: ${{ secrets.CLOUD_USERNAME }}' -H 'X-Api-Key: ${{ secrets.CLOUD_PASSWORD }}' -H 'Content-Type: application/json' -X POST -d '
6662 {
7571 fi
7672
7773 - name : Update deployment status (success)
78- if : success() && github.ref == 'refs/heads/demo ' || success() && github.ref == 'refs/heads/test '
74+ if : success() && github.ref == 'refs/heads/master ' || success() && github.ref == 'refs/heads/develop '
7975 uses : chrnorm/deployment-status@releases/v1
8076 with :
8177 token : " ${{ github.token }}"
8480 description : Congratulations! The deploy is done.
8581 deployment_id : ${{ steps.deployment.outputs.deployment_id }}
8682 - name : Update deployment status (failure)
87- if : failure() && github.ref == 'refs/heads/demo ' || failure() && github.ref == 'refs/heads/test '
83+ if : failure() && github.ref == 'refs/heads/master ' || failure() && github.ref == 'refs/heads/develop '
8884 uses : chrnorm/deployment-status@releases/v1
8985 with :
9086 token : " ${{ github.token }}"
0 commit comments