File tree Expand file tree Collapse file tree 1 file changed +31
-4
lines changed Expand file tree Collapse file tree 1 file changed +31
-4
lines changed Original file line number Diff line number Diff line change 7
7
# documentation.
8
8
9
9
# Action name
10
- name : Java CI with Maven
10
+ name : Test Java CI with Maven
11
11
12
12
# When will the action run
13
13
on :
17
17
branches : [ "testGitHub-Action" ]
18
18
19
19
jobs :
20
- # build the project
21
- build :
20
+ build-frontend :
21
+ runs-on : ubuntu-latest
22
+ defaults :
23
+ run :
24
+ working-directory : ./code/frontend
25
+
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+
29
+ - name : Set up npm
30
+ uses : actions/setup-node@v4
22
31
32
+ - run : npm install
33
+ - run : npm run build
34
+
35
+ - name : Upload artifact
36
+ uses : actions/upload-artifact@v4
37
+ with :
38
+ name : frontend
39
+ path : ./code/frontend/dist/
40
+
41
+ # build the project
42
+ build-backend :
43
+ needs : [build-frontend]
23
44
runs-on : ubuntu-latest
24
45
defaults :
25
46
run :
33
54
java-version : ' 17'
34
55
distribution : ' temurin'
35
56
cache : maven
57
+
58
+ - name : download frontend
59
+ uses : actions/download-artifact@v4
60
+ with :
61
+ name : frontend
62
+ path : ./code/backend/src/main/resource/static/
36
63
37
64
- name : Build with Maven
38
65
run : mvn clean package --file pom.xml
45
72
46
73
# build a docker image and push it to Docker Hub
47
74
deploy :
48
- needs : [build]
75
+ needs : [build-backend ]
49
76
runs-on : ubuntu-latest
50
77
51
78
steps :
You can’t perform that action at this time.
0 commit comments