Skip to content

Commit

Permalink
Rename prod environment to production
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyRae committed Mar 20, 2024
1 parent 17bc75d commit 3e91126
Showing 1 changed file with 40 additions and 42 deletions.
82 changes: 40 additions & 42 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,22 @@ jobs:
package: ${{ github.workspace }}/functionsapp
publish-profile: ${{ env.AZURE_FUNCAPP_PUBLISH_PROFILE }}

# Deploy Web App Dev
deploy-web-dev:
runs-on: ubuntu-latest
needs: [build-and-publish-web, deploy-workers-dev]
environment:
name: 'dev'
url: ${{ steps.deploy-web-dev.outputs.webapp-url }}

steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'ccom-dev'
publish-profile: ${{ env.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: 'ccomreg.azurecr.io/${{ secrets.REGISTRY_USERNAME_DEV }}/latest:${{ github.sha }}'

# Deploy Workers Test
deploy-workers-test:
Expand All @@ -115,11 +131,28 @@ jobs:
package: ${{ github.workspace }}/functionsapp
publish-profile: ${{ env.AZURE_FUNCAPP_PUBLISH_PROFILE }}

# Deploy Workers Prod
deploy-workers-prod:
# Deploy Web App Test
deploy-web-test:
runs-on: ubuntu-latest
needs: [deploy-web-dev, deploy-workers-test]
environment:
name: 'test'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'ccom-test'
publish-profile: ${{ env.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: 'ccomreg.azurecr.io/${{ secrets.REGISTRY_USERNAME_DEV }}/latest:${{ github.sha }}'

# Deploy Workers Production
deploy-workers-production:
runs-on: ubuntu-latest
needs: deploy-workers-test
environment: prod
environment: production

steps:
- name: Download artifact from build job
Expand All @@ -137,47 +170,12 @@ jobs:
package: ${{ github.workspace }}/functionsapp
publish-profile: ${{ env.AZURE_FUNCAPP_PUBLISH_PROFILE }}

# Deploy Web App Dev
deploy-web-dev:
runs-on: ubuntu-latest
needs: [build-and-publish-web, deploy-workers-dev]
environment:
name: 'dev'
url: ${{ steps.deploy-web-dev.outputs.webapp-url }}

steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'ccom-dev'
publish-profile: ${{ env.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: 'ccomreg.azurecr.io/${{ secrets.REGISTRY_USERNAME_DEV }}/latest:${{ github.sha }}'

# Deploy Web App Test
deploy-web-test:
runs-on: ubuntu-latest
needs: [deploy-web-dev, deploy-workers-test]
environment:
name: 'test'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'ccom-test'
publish-profile: ${{ env.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: 'ccomreg.azurecr.io/${{ secrets.REGISTRY_USERNAME_DEV }}/latest:${{ github.sha }}'


# Deploy Web App Prod
deploy-web-prod:
# Deploy Web App Production
deploy-web-production:
runs-on: ubuntu-latest
needs: [deploy-web-test, deploy-workers-prod]
needs: [deploy-web-test, deploy-workers-production]
environment:
name: 'prod'
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
Expand Down

0 comments on commit 3e91126

Please sign in to comment.