Moving app to azure storage

This commit is contained in:
2025-04-19 12:08:34 -05:00
parent 01e180e8f3
commit b2bd0de4dc
6 changed files with 22 additions and 70 deletions

View File

@@ -5,9 +5,6 @@ on:
environment_name: environment_name:
required: true required: true
type: string type: string
version_number:
required: true
type: string
env: env:
VITE_API_URL: ${{ vars.VITE_API_URL }} VITE_API_URL: ${{ vars.VITE_API_URL }}

View File

@@ -1,35 +0,0 @@
name: Deploy
on:
workflow_call:
inputs:
app_name:
required: true
type: string
environment_name:
required: true
type: string
version_number:
required: true
type: string
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment_name }}
steps:
- name: Log in to Azure
uses: azure/login@v2
with:
client-id: ${{ vars.VITE_CLIENT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
tenant-id: ${{ vars.VITE_TENANT_ID }}
- name: Azure CLI script
uses: azure/cli@v2
with:
azcliversion: latest
inlineScript: |
az containerapp update --name ${{ inputs.app_name }}-${{ inputs.environment_name }} --resource-group noahspan-root --image docker.io/noahspan/${{ inputs.app_name }}:${{ inputs.version_number }}

View File

@@ -24,7 +24,7 @@ jobs:
needs: needs:
- changes - changes
- build-api - build-api
uses: ./.github/workflows/deploy.yaml uses: ./.github/workflows/api_deploy.yaml
with: with:
app_name: root-api app_name: root-api
environment_name: test environment_name: test
@@ -33,23 +33,11 @@ jobs:
build-deploy-app: build-deploy-app:
if: ${{ needs.changes.outputs.app == 'true' }} if: ${{ needs.changes.outputs.app == 'true' }}
name: build-app name: build-deploy-app
needs: needs:
- changes - changes
uses: ./.github/workflows/app_build_deploy.yaml uses: ./.github/workflows/app_build_deploy.yaml
with: with:
environment_name: test environment_name: test
version_number: ${{ github.run_id }}
secrets: inherit secrets: inherit
# deploy-app:
# name: deploy-app
# needs:
# - changes
# - build-app
# uses: ./.github/workflows/deploy.yaml
# with:
# app_name: root-app
# environment_name: test
# version_number: ${{ github.run_id }}
# secrets: inherit

View File

@@ -26,5 +26,4 @@ jobs:
uses: ./.github/workflows/app_build_deploy.yaml uses: ./.github/workflows/app_build_deploy.yaml
with: with:
environment_name: pull_request environment_name: pull_request
version_number: ${{ github.run_id }}
secrets: inherit secrets: inherit

View File

@@ -17,28 +17,16 @@ jobs:
name: deploy-api name: deploy-api
needs: needs:
- build-api - build-api
uses: ./.github/workflows/deploy.yaml uses: ./.github/workflows/api_deploy.yaml
with: with:
app_name: root-api app_name: root-api
environment_name: prod environment_name: prod
version_number: ${{ github.ref_name }} version_number: ${{ github.ref_name }}
secrets: inherit secrets: inherit
build-app: build-deploy-app:
name: build-app name: build-deploy-app
uses: ./.github/workflows/app_build.yaml uses: ./.github/workflows/app_build_deploy.yaml
with: with:
environment_name: prod environment_name: prod
version_number: ${{ github.ref_name }}
secrets: inherit
deploy-app:
name: deploy-app
needs:
- build-app
uses: ./.github/workflows/deploy.yaml
with:
app_name: root-app
environment_name: prod
version_number: ${{ github.ref_name }}
secrets: inherit secrets: inherit

View File

@@ -56,6 +56,12 @@ locals {
index_document = "index.html" index_document = "index.html"
} }
] ]
prod = [
{
error_404_document = "custom_not_found.html"
index_document = "index.html"
}
]
} }
storage_account_name = { storage_account_name = {
@@ -73,6 +79,15 @@ locals {
source = "index.html" source = "index.html"
} }
] ]
prod = [
{
name = "web"
storage_container_name = "$web"
type = "Block"
content_type = "text/html"
source = "index.html"
}
]
} }
storage_tables = { storage_tables = {