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 - masterchef2T
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 : ' 17'
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_6216F7334C5C406982E2094EAB3A983E }}
53+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_CB67D442C8E34E8BA5EBF39F6FC10489 }}
54+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_0800D99FA6C84866969A3C31D490EF2E }}
55+
56+ - name : Deploy to Azure Web App
57+ id : deploy-to-webapp
58+ uses : azure/webapps-deploy@v3
59+ with :
60+ app-name : ' masterchef2T'
61+ slot-name : ' Production'
62+ package : ' *.jar'
63+
You can’t perform that action at this time.
0 commit comments