Skip to content

Commit

Permalink
add deploy to Azure WebApp step
Browse files Browse the repository at this point in the history
  • Loading branch information
elrayle committed Jan 18, 2024
1 parent dad689b commit d631302
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/build_and_deploy_dev.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Build and Deploy to dev service app

on:
workflow_dispatch:
push:
branches:
- elr/gh-action-dev-deploy
# branches: [master]
branches: [elr/gh-action-dev-deploy]

# env:
# AZURE_WEBAPP_NAME: clearlydefined-api-dev
# # AZURE_WEBAPP_PACKAGE_PATH: '.' # TODO: confirm that root is the webapp root (default is root)
# NODE_VERSION: '18' # TODO: does this need to have a minor version?
env:
AZURE_WEBAPP_NAME: clearlydefined-api-dev
DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}-dev

jobs:
build-and-deploy:
Expand All @@ -31,15 +31,17 @@ jobs:
push: true
file: DevDockerfile
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}-dev:latest
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}-dev:${{ github.sha }}
${{ env.DOCKER_IMAGE_NAME }}:latest
${{ env.DOCKER_IMAGE_NAME }}:${{ github.sha }}
labels: |
env=dev
type=api
# - name: 'Deploy to Azure WebApp'
# uses: azure/webapps-deploy@v2
# with:
# app-name: ${{ env.AZURE_WEBAPP_NAME }}
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# # package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} # TODO: uncomment if determined that root is not the webapp root
- name: 'Deploy to Azure WebApp'
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
image-name: ${{ env.DOCKER_IMAGE_NAME }}:latest
# image-user: ${{ secrets.GHCR_USERNAME }}
# image-password: ${{ secrets.GHCR_TOKEN }}

0 comments on commit d631302

Please sign in to comment.