Skip to content

Commit

Permalink
Modified pipelines. (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Utar94 authored Oct 19, 2023
1 parent 4249814 commit ed28536
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/production-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ defaults:
working-directory: ./backend

jobs:
build:
build_and_deploy_job:
runs-on: ubuntu-latest

name: Build & Deploy Job
steps:
- uses: actions/checkout@v4
- uses: azure/docker-login@v1
with:
login-server: francispion.azurecr.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
- name: Build & Push Docker image
run: |
docker build . -t francispion.azurecr.io/wishes-api:${{ github.sha }} -f src/Logitar.Wishes/Dockerfile
docker push francispion.azurecr.io/wishes-api:${{ github.sha }}
- uses: azure/webapps-deploy@v3
- name: Deploy Docker image
uses: azure/webapps-deploy@v3
with:
app-name: 'api-wishes'
app-name: "api-wishes"
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_PRODUCTION }}
images: 'francispion.azurecr.io/wishes-api:${{ github.sha }}'
images: "francispion.azurecr.io/wishes-api:${{ github.sha }}"
29 changes: 29 additions & 0 deletions .github/workflows/production-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy Production Frontend

on:
release:
types: [published]
workflow_dispatch:

defaults:
run:
working-directory: ./frontend

jobs:
build_and_deploy_job:
runs-on: ubuntu-latest
name: Build & Deploy Job
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build & Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_WEBAPP_DEPLOYMENT_TOKEN_PRODUCTION }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "/"
app_build_command: "npm run build"
output_location: "dist"

0 comments on commit ed28536

Please sign in to comment.