Skip to content

Commit e6991f6

Browse files
committed
Add or update the Azure App Service build and deployment workflow config
1 parent 10fdfe0 commit e6991f6

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 }}

0 commit comments

Comments
 (0)