Skip to content

Commit 7185e66

Browse files
committed
Add or update the Azure App Service build and deployment workflow config
1 parent 3d1df5b commit 7185e66

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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 - QuickyAdmin
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_4D81BFA44AC0421BB6B7AF0F36B6FD65 }}
53+
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_0020BA59BE2544508A0D6FFE60FBD3F4 }}
54+
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_E79B93D662F34431AE6F22B9A8F54D5C }}
55+
56+
- name: Deploy to Azure Web App
57+
id: deploy-to-webapp
58+
uses: azure/webapps-deploy@v3
59+
with:
60+
app-name: 'QuickyAdmin'
61+
slot-name: 'Production'
62+
package: '*.jar'
63+

0 commit comments

Comments
 (0)