File tree 1 file changed +44
-0
lines changed
1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Deploy WAR
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v2
15
+
16
+ - name : Set up JDK 14
17
+ uses : actions/setup=java@v1
18
+ with :
19
+ java-version : 14
20
+
21
+ - name : Build WAR
22
+ run : jar cvf helloworld.war WEB-INF
23
+
24
+ - name : Display WAR file
25
+ run : ls helloworld.war
26
+
27
+ - name : Deploy WAR
28
+ run : |
29
+ mkdir -p deployment
30
+ cp helloworld.war deployment/
31
+
32
+ - name : Store WAR files in repo
33
+ run : |
34
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
35
+ git config --global user.name "github-actions[bot]"
36
+ mkdir -p war
37
+ cp helloworld.war war/
38
+ git add war
39
+ git commit -m "Add WAR file"
40
+ git push origin master
41
+
42
+
43
+
44
+
You can’t perform that action at this time.
0 commit comments