Skip to content

add some localizations for resource types #27

add some localizations for resource types

add some localizations for resource types #27

# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Prod - Build and deploy languageapi-controller-func-prod
on:
push:
branches:
- prod
paths:
- controller/**
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: "./controller" # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: "18.x" # set this to the node version to use (supports 8.x, 10.x, 12.x)
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@v4
- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Load secret
uses: 1password/load-secrets-action@v2
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
DATABASE_URL: "op://AppDev Scripture Accessibility/languageapi-prod/connection string"
- name: "Load PNPM"
uses: pnpm/action-setup@v4
with:
version: 8
- name: "Build and Test Controller"
shell: bash
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
echo "node-linker=hoisted" > .npmrc
pnpm install
pnpm run --if-present build
pnpm run --if-present test
popd
- name: "Migrate DB"
env:
DATABASE_URL: ${{ env.DATABASE_URL }}
run: |
pushd ./controller
echo "node-linker=hoisted" > .npmrc
pnpm install
pnpm run migrate
popd
- name: "Run Azure Functions Action"
uses: Azure/functions-action@v1
id: fa
with:
app-name: "languageapi-controller-func-prod"
slot-name: "Production"
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_26495F5E043E4D39934C9328340C2F12 }}