forked from NashTech-Labs/node-hello
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.36 KB
/
main_manjari.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
41
42
43
# 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: Build and deploy Java project to Azure Function App - manjari
on:
push:
branches:
- main
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_NAME: manjari # set this to your function app name on Azure
PACKAGE_DIRECTORY: '.' # set this to the directory which contains pom.xml file
JAVA_VERSION: '8' # set this to the java version to use
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v2
- name: Setup Java Sdk ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- name: 'Restore Project Dependencies Using Mvn'
shell: pwsh
run: |
pushd './${{ env.PACKAGE_DIRECTORY }}'
mvn clean package
popd
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'manjari'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_950DE852A0CF4049B036D935C01A9ED4 }}
package: '${{ env.PACKAGE_DIRECTORY }}'
respect-pom-xml: true