Moving app to azure storage
This commit is contained in:
5
.github/workflows/app_build_deploy.yaml
vendored
5
.github/workflows/app_build_deploy.yaml
vendored
@@ -5,10 +5,7 @@ on:
|
||||
environment_name:
|
||||
required: true
|
||||
type: string
|
||||
version_number:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
|
||||
env:
|
||||
VITE_API_URL: ${{ vars.VITE_API_URL }}
|
||||
VITE_CLIENT_ID: ${{ vars.VITE_CLIENT_ID }}
|
||||
|
||||
35
.github/workflows/deploy.yaml
vendored
35
.github/workflows/deploy.yaml
vendored
@@ -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 }}
|
||||
16
.github/workflows/main.yaml
vendored
16
.github/workflows/main.yaml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
needs:
|
||||
- changes
|
||||
- build-api
|
||||
uses: ./.github/workflows/deploy.yaml
|
||||
uses: ./.github/workflows/api_deploy.yaml
|
||||
with:
|
||||
app_name: root-api
|
||||
environment_name: test
|
||||
@@ -33,23 +33,11 @@ jobs:
|
||||
|
||||
build-deploy-app:
|
||||
if: ${{ needs.changes.outputs.app == 'true' }}
|
||||
name: build-app
|
||||
name: build-deploy-app
|
||||
needs:
|
||||
- changes
|
||||
uses: ./.github/workflows/app_build_deploy.yaml
|
||||
with:
|
||||
environment_name: test
|
||||
version_number: ${{ github.run_id }}
|
||||
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
|
||||
|
||||
1
.github/workflows/pull_request.yaml
vendored
1
.github/workflows/pull_request.yaml
vendored
@@ -26,5 +26,4 @@ jobs:
|
||||
uses: ./.github/workflows/app_build_deploy.yaml
|
||||
with:
|
||||
environment_name: pull_request
|
||||
version_number: ${{ github.run_id }}
|
||||
secrets: inherit
|
||||
|
||||
20
.github/workflows/tag.yaml
vendored
20
.github/workflows/tag.yaml
vendored
@@ -17,28 +17,16 @@ jobs:
|
||||
name: deploy-api
|
||||
needs:
|
||||
- build-api
|
||||
uses: ./.github/workflows/deploy.yaml
|
||||
uses: ./.github/workflows/api_deploy.yaml
|
||||
with:
|
||||
app_name: root-api
|
||||
environment_name: prod
|
||||
version_number: ${{ github.ref_name }}
|
||||
secrets: inherit
|
||||
|
||||
build-app:
|
||||
name: build-app
|
||||
uses: ./.github/workflows/app_build.yaml
|
||||
build-deploy-app:
|
||||
name: build-deploy-app
|
||||
uses: ./.github/workflows/app_build_deploy.yaml
|
||||
with:
|
||||
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
|
||||
|
||||
@@ -56,6 +56,12 @@ locals {
|
||||
index_document = "index.html"
|
||||
}
|
||||
]
|
||||
prod = [
|
||||
{
|
||||
error_404_document = "custom_not_found.html"
|
||||
index_document = "index.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
storage_account_name = {
|
||||
@@ -73,6 +79,15 @@ locals {
|
||||
source = "index.html"
|
||||
}
|
||||
]
|
||||
prod = [
|
||||
{
|
||||
name = "web"
|
||||
storage_container_name = "$web"
|
||||
type = "Block"
|
||||
content_type = "text/html"
|
||||
source = "index.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
storage_tables = {
|
||||
|
||||
Reference in New Issue
Block a user