File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2+ # More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+ name : Build and deploy JAR app to Azure Web App - todoSath
5+
6+ on :
7+ push :
8+ branches :
9+ - master
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v2
18+
19+ - name : Set up Java version
20+ uses : actions/setup-java@v1
21+ with :
22+ java-version : ' 8'
23+
24+ - name : Build with Maven
25+ run : mvn clean install
26+
27+ - name : Upload artifact for deployment job
28+ uses : actions/upload-artifact@v2
29+ with :
30+ name : java-app
31+ path : ' ${{ github.workspace }}/target/*.jar'
32+
33+ deploy :
34+ runs-on : ubuntu-latest
35+ needs : build
36+ environment :
37+ name : ' Production'
38+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
39+
40+ steps :
41+ - name : Download artifact from build job
42+ uses : actions/download-artifact@v2
43+ with :
44+ name : java-app
45+
46+ - name : Deploy to Azure Web App
47+ id : deploy-to-webapp
48+ uses : azure/webapps-deploy@v2
49+ with :
50+ app-name : ' todoSath'
51+ slot-name : ' Production'
52+ publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_10C5B1EBD2674A539BF3820456548FFA }}
53+ package : ' *.jar'
You can’t perform that action at this time.
0 commit comments