Skip to content

Commit

Permalink
Add temporary deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyRae committed Apr 9, 2024
1 parent 1ed273e commit 4ce175f
Showing 1 changed file with 78 additions and 78 deletions.
156 changes: 78 additions & 78 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Deploy to Azure - ccom
on:
push:
branches:
- master
- feat/662/data-package
workflow_dispatch:

env:
Expand Down Expand Up @@ -174,80 +174,80 @@ jobs:
package: ${{ github.workspace }}/frontendwebapp

# Deploy Workers Test
deploy-workers-test:
runs-on: ubuntu-latest
needs: deploy-workers-dev
environment: test

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
path: functionsapp
name: functionsapp

- name: 'Run Azure Functions Action'
uses: Azure/[email protected]
id: fa
with:
app-name: 'ccom-funcs-test'
slot-name: 'production'
package: ${{ github.workspace }}/functionsapp
publish-profile: ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}

# 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: ${{ secrets.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: production

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
path: functionsapp
name: functionsapp

- name: 'Run Azure Functions Action'
uses: Azure/[email protected]
id: fa
with:
app-name: 'ccom-funcs-prod'
slot-name: 'production'
package: ${{ github.workspace }}/functionsapp
publish-profile: ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}

# Deploy Web App Production
deploy-web-production:
runs-on: ubuntu-latest
needs: [deploy-web-test, deploy-workers-production]
environment:
name: 'production'
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'
slot-name: 'production'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: 'ccomreg.azurecr.io/${{ secrets.REGISTRY_USERNAME_DEV }}/latest:${{ github.sha }}'
# deploy-workers-test:
# runs-on: ubuntu-latest
# needs: deploy-workers-dev
# environment: test

# steps:
# - name: Download artifact from build job
# uses: actions/download-artifact@v4
# with:
# path: functionsapp
# name: functionsapp

# - name: 'Run Azure Functions Action'
# uses: Azure/[email protected]
# id: fa
# with:
# app-name: 'ccom-funcs-test'
# slot-name: 'production'
# package: ${{ github.workspace }}/functionsapp
# publish-profile: ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}

# # 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: ${{ secrets.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: production

# steps:
# - name: Download artifact from build job
# uses: actions/download-artifact@v4
# with:
# path: functionsapp
# name: functionsapp

# - name: 'Run Azure Functions Action'
# uses: Azure/[email protected]
# id: fa
# with:
# app-name: 'ccom-funcs-prod'
# slot-name: 'production'
# package: ${{ github.workspace }}/functionsapp
# publish-profile: ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}

# # Deploy Web App Production
# deploy-web-production:
# runs-on: ubuntu-latest
# needs: [deploy-web-test, deploy-workers-production]
# environment:
# name: 'production'
# 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'
# slot-name: 'production'
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# images: 'ccomreg.azurecr.io/${{ secrets.REGISTRY_USERNAME_DEV }}/latest:${{ github.sha }}'

0 comments on commit 4ce175f

Please sign in to comment.