Skip to content

add log to frontend #25

add log to frontend

add log to frontend #25

name: Deploy to Azure
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
actions: read
jobs:
build_and_deploy_components:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Components
steps:
- uses: actions/checkout@v4
- uses: azure/setup-kubectl@v4
- uses: Azure/k8s-set-context@v4
with:
kubeconfig: ${{ secrets.KUBE_CONFIG }}
- run: |
kubectl apply -f deploy/cosmosdb-statestore.yaml
kubectl apply -f deploy/pubsub.yaml
build_and_deploy_order_management_service:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Order Management
steps:
- uses: actions/checkout@v4
- uses: Azure/docker-login@v1
with:
login-server: ${{ secrets.ACR_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASS }}
- run: |
docker build ./order-management -t daprcafe.azurecr.io/order-management:new
docker push daprcafe.azurecr.io/order-management:new
- uses: azure/setup-kubectl@v4
- uses: Azure/k8s-set-context@v4
with:
kubeconfig: ${{ secrets.KUBE_CONFIG }}
- run: |
kubectl apply -f deploy/deployment.yaml
kubectl apply -f deploy/service.yaml
build_and_deploy_order_processor_service:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Order Processor
steps:
- uses: actions/checkout@v4
- uses: Azure/docker-login@v1
with:
login-server: ${{ secrets.ACR_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASS }}
- run: |
docker build ./order-processor -t daprcafe.azurecr.io/order-processor:latest
docker push daprcafe.azurecr.io/order-processor:latest
- uses: azure/setup-kubectl@v4
- uses: Azure/k8s-set-context@v4
with:
kubeconfig: ${{ secrets.KUBE_CONFIG }}
- run: |
kubectl apply -f deploy/deployment.yaml
build_and_deploy_frontend:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Frontend
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_TREE_098987F0F }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "/frontend/"
api_location: ""
output_location: "build"