File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed
Expand file tree Collapse file tree 1 file changed +63
-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 - ics-server-2
5+
6+ on :
7+ push :
8+ branches :
9+ - production
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-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 : ' java21'
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/*.jar'
33+
34+ deploy :
35+ runs-on : ubuntu-latest
36+ needs : build
37+ environment :
38+ name : ' Production'
39+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
40+ permissions :
41+ id-token : write # This is required for requesting the JWT
42+
43+ steps :
44+ - name : Download artifact from build job
45+ uses : actions/download-artifact@v4
46+ with :
47+ name : java-app
48+
49+ - name : Login to Azure
50+ uses : azure/login@v2
51+ with :
52+ client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_4B50CAB1A497406EB7E2219E044A7CE2 }}
53+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_789E031FBAF945D4AB82AD2329762290 }}
54+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_EC1B2F291BAE42B3A08DF97264210E35 }}
55+
56+ - name : Deploy to Azure Web App
57+ id : deploy-to-webapp
58+ uses : azure/webapps-deploy@v3
59+ with :
60+ app-name : ' ics-server-2'
61+ slot-name : ' Production'
62+ package : ' *.jar'
63+
You can’t perform that action at this time.
0 commit comments