File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 WAR app to Azure Web App - tcpdpmpoc
5+
6+ on :
7+ push :
8+ branches :
9+ - patch-1
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : windows-latest
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Set up Java version
20+ uses : actions/setup-java@v4
21+ with :
22+ java-version : ' 21'
23+ distribution : ' microsoft'
24+
25+ - name : Build with Maven
26+ run : mvn clean install
27+
28+ - name : Upload artifact for deployment job
29+ uses : actions/upload-artifact@v4
30+ with :
31+ name : java-app
32+ path : ' ${{ github.workspace }}/target/*.war'
33+
34+ deploy :
35+ runs-on : windows-latest
36+ needs : build
37+ environment :
38+ name : ' Production'
39+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
40+
41+ steps :
42+ - name : Download artifact from build job
43+ uses : actions/download-artifact@v4
44+ with :
45+ name : java-app
46+
47+ - name : Deploy to Azure Web App
48+ id : deploy-to-webapp
49+ uses : azure/webapps-deploy@v3
50+ with :
51+ app-name : ' tcpdpmpoc'
52+ slot-name : ' Production'
53+ package : ' *.war'
54+ publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_3258DE267D324E279EE1EAEEECA2FFBA }}
You can’t perform that action at this time.
0 commit comments