-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.15 KB
/
NMSReportingSuite-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build and Deploy to Staging
on:
push:
branches:
- deployment
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
# Step 1: Check out the code
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Set up Java
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
# Step 3: Build the JAR
- name: Build with Maven
run: mvn clean install -f NMSReportingSuite/pom.xml
# Step 4: Install Grunt CLI only if not already installed
- name: Install Grunt CLI
run: |
if ! command -v grunt &> /dev/null; then
npm install -g grunt-cli
else
echo "Grunt CLI is already installed"
fi
# Step 5: Build FrontEnd files
- name: Install Frontend Dependencies and Build with Grunt
run: |
cd app
grunt package
# Step 5: Download Action Button
- uses: actions/upload-artifact@v4
with:
name: my-artifact
path: |
NMSReportingSuite/target/*.war
app/*