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 - zapverse
5+
6+ on :
7+ push :
8+ branches :
9+ - main
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read # This is required for actions/checkout
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Set up Java version
22+ uses : actions/setup-java@v4
23+ with :
24+ java-version : ' 21'
25+ distribution : ' microsoft'
26+
27+ - name : Build with Maven
28+ run : mvn clean install
29+
30+ - name : Upload artifact for deployment job
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : java-app
34+ path : ' ${{ github.workspace }}/target/*.jar'
35+
36+ deploy :
37+ runs-on : ubuntu-latest
38+ needs : build
39+ permissions :
40+ id-token : write # This is required for requesting the JWT
41+ contents : read # This is required for actions/checkout
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_169681B710F14D49A45D8DA4746FED40 }}
53+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_0435125B5F9A4EFCB8554677C1ADF1BF }}
54+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_03A87841C7FC43A9B31B45EC2099E6E9 }}
55+
56+ - name : Deploy to Azure Web App
57+ id : deploy-to-webapp
58+ uses : azure/webapps-deploy@v3
59+ with :
60+ app-name : ' zapverse'
61+ slot-name : ' Production'
62+ package : ' *.jar'
63+
You can’t perform that action at this time.
0 commit comments