changing api to azure function app

This commit is contained in:
2024-11-25 20:08:06 -06:00
parent f70e8cce2a
commit 2a63f8672c
9 changed files with 203 additions and 96 deletions

36
.github/workflows/api.yaml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: 'API Build and Deploy'
on:
workflow_call:
inputs:
calling_workflow:
required: true
type: string
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.calling_workflow }}
steps:
- name: 'Checkout'
uses: action/checkout@v4
- name: 'Setup Node'
uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION }}
- name: Install
run: |
npm install
- name: Build
shell: bash
run: |
npm run build -w api
- name: Deploy
uses: Azure/functions-action@v1
with:
app-name: ${{ vars.API_FUNCTION_APP_NAME }}
package: ${{ vars.API_FUNCTION_APP_PACKAGE_PATH }}
publish-profile: ${{ secrets.API_FUNCTION_APP_PUBLISH_PROFILE }}