-
-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (34 loc) · 1.17 KB
/
main_kasca-server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build and deploy Node.js project to Azure Function App - kasca-server
on:
push:
branches:
- main
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'server' # Set to your project directory
NODE_VERSION: '22.x' # Set the Node.js version
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@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: 'Install Dependencies and Build Project with PNPM'
shell: bash
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
pnpm install --frozen-lockfile
pnpm run build
popd
- name: 'Deploy to Azure Functions'
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'kasca-server'
slot-name: 'Production'
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_50C06133FAA045658DF029920A77CCD8 }}