fix: complete i18n coverage for all pages - replace all hardcoded Chi… #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Deploy OKMS to Azure | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "*.md" | |
| - "docs/**" | |
| workflow_dispatch: | |
| env: | |
| ACR_LOGIN_SERVER: okmsacr120.azurecr.io | |
| ACR_NAME: okmsacr120 | |
| BACKEND_APP_NAME: okms-backend-app | |
| FRONTEND_APP_NAME: okms-frontend-app | |
| RESOURCE_GROUP: okms-rg | |
| jobs: | |
| build-and-push: | |
| name: Build & Push Docker Images | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image_tag: ${{ steps.meta.outputs.image_tag }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set image tag | |
| id: meta | |
| run: echo "image_tag=${{ github.run_number }}" >> $GITHUB_OUTPUT | |
| - name: Login to Azure Container Registry | |
| uses: azure/docker-login@v2 | |
| with: | |
| login-server: ${{ env.ACR_LOGIN_SERVER }} | |
| username: ${{ secrets.ACR_USERNAME }} | |
| password: ${{ secrets.ACR_PASSWORD }} | |
| - name: Build & push backend image | |
| run: | | |
| docker build \ | |
| --platform linux/amd64 \ | |
| -t ${{ env.ACR_LOGIN_SERVER }}/okms-backend:${{ steps.meta.outputs.image_tag }} \ | |
| -t ${{ env.ACR_LOGIN_SERVER }}/okms-backend:latest \ | |
| -f backend/Dockerfile backend | |
| docker push ${{ env.ACR_LOGIN_SERVER }}/okms-backend:${{ steps.meta.outputs.image_tag }} | |
| docker push ${{ env.ACR_LOGIN_SERVER }}/okms-backend:latest | |
| - name: Build & push frontend image | |
| run: | | |
| docker build \ | |
| --platform linux/amd64 \ | |
| --build-arg NEXT_PUBLIC_API_URL=https://${{ env.BACKEND_APP_NAME }}.azurewebsites.net \ | |
| -t ${{ env.ACR_LOGIN_SERVER }}/okms-frontend:${{ steps.meta.outputs.image_tag }} \ | |
| -t ${{ env.ACR_LOGIN_SERVER }}/okms-frontend:latest \ | |
| -f frontend/Dockerfile frontend | |
| docker push ${{ env.ACR_LOGIN_SERVER }}/okms-frontend:${{ steps.meta.outputs.image_tag }} | |
| docker push ${{ env.ACR_LOGIN_SERVER }}/okms-frontend:latest | |
| deploy: | |
| name: Deploy to Azure App Service | |
| runs-on: ubuntu-latest | |
| needs: build-and-push | |
| environment: production | |
| steps: | |
| - name: Login to Azure | |
| uses: azure/login@v2 | |
| with: | |
| creds: ${{ secrets.AZURE_CREDENTIALS }} | |
| - name: Deploy backend container | |
| uses: azure/webapps-deploy@v3 | |
| with: | |
| app-name: ${{ env.BACKEND_APP_NAME }} | |
| images: ${{ env.ACR_LOGIN_SERVER }}/okms-backend:${{ needs.build-and-push.outputs.image_tag }} | |
| - name: Deploy frontend container | |
| uses: azure/webapps-deploy@v3 | |
| with: | |
| app-name: ${{ env.FRONTEND_APP_NAME }} | |
| images: ${{ env.ACR_LOGIN_SERVER }}/okms-frontend:${{ needs.build-and-push.outputs.image_tag }} | |
| - name: Verify deployment | |
| run: | | |
| sleep 30 | |
| curl -sf https://${{ env.BACKEND_APP_NAME }}.azurewebsites.net/health || echo "Backend not ready yet" | |
| curl -sf -o /dev/null -w "%{http_code}" https://${{ env.FRONTEND_APP_NAME }}.azurewebsites.net || echo "Frontend check done" |