Skip to content

Commit 1dd119f

Browse files
committed
2 parents 586b9cd + cfdfa33 commit 1dd119f

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2+
# More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+
name: Build and deploy Node.js project to Azure Function App - prod-func-statistics-api-v1
5+
6+
on:
7+
release:
8+
types: [published]
9+
branches: [main]
10+
workflow_dispatch:
11+
12+
env:
13+
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
14+
NODE_VERSION: '18.x' # set this to the node version to use (supports 8.x, 10.x, 12.x)
15+
16+
jobs:
17+
build-and-deploy:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: 'Checkout GitHub Action'
21+
uses: actions/checkout@v2
22+
23+
- name: Setup Node ${{ env.NODE_VERSION }} Environment
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ env.NODE_VERSION }}
27+
28+
- name: 'Resolve Project Dependencies Using Npm'
29+
shell: bash
30+
run: |
31+
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
32+
npm install
33+
npm run build --if-present
34+
npm run test --if-present
35+
popd
36+
37+
- name: 'Run Azure Functions Action'
38+
uses: Azure/functions-action@v1
39+
id: fa
40+
with:
41+
app-name: 'prod-func-statistics-api-v1'
42+
slot-name: 'Production'
43+
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
44+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_436A890448A849D48961357172648693 }}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2+
# More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+
name: Build and deploy Node.js project to Azure Function App - test-func-statistics-api-v1
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
env:
13+
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
14+
NODE_VERSION: '18.x' # set this to the node version to use (supports 8.x, 10.x, 12.x)
15+
16+
jobs:
17+
build-and-deploy:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: 'Checkout GitHub Action'
21+
uses: actions/checkout@v2
22+
23+
- name: Setup Node ${{ env.NODE_VERSION }} Environment
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ env.NODE_VERSION }}
27+
28+
- name: 'Resolve Project Dependencies Using Npm'
29+
shell: bash
30+
run: |
31+
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
32+
npm install
33+
npm run build --if-present
34+
npm run test --if-present
35+
popd
36+
37+
- name: 'Run Azure Functions Action'
38+
uses: Azure/functions-action@v1
39+
id: fa
40+
with:
41+
app-name: 'test-func-statistics-api-v1'
42+
slot-name: 'Production'
43+
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
44+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_1755D9FF585A48F3A949523C69E38276 }}

0 commit comments

Comments
 (0)