Skip to content

Commit

Permalink
Refactor Azure deployment workflow to include Azure Web App deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadhonrao committed Sep 17, 2024
1 parent 76276b0 commit 534a6e3
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/api-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

env:
DOCKER_IMAGE: prasadhonrao/devcamper-api
AZURE_WEBAPP_NAME: devcamper-api

jobs:
build:
Expand Down Expand Up @@ -40,21 +41,17 @@ jobs:
needs: build

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
- name: Log in to Azure
uses: azure/login@v2
with:
node-version: '20'
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Install dependencies
run: npm install --prefix api
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
images: '${{ env.DOCKER_IMAGE }}:latest'

- name: Deploy
run: |
# Add your deployment steps here
echo "Deploying the application..."
notify:
runs-on: ubuntu-latest
needs: deploy
Expand Down

0 comments on commit 534a6e3

Please sign in to comment.