File tree Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -43,15 +43,50 @@ jobs:
43
43
name : BackendApplicationJar
44
44
path : backend/build/libs/*.jar
45
45
46
+ build-frontend :
47
+ runs-on : ubuntu-22.04
48
+ defaults :
49
+ run :
50
+ working-directory : frontend
51
+
52
+ steps :
53
+ - name : Set up Repository
54
+ uses : actions/checkout@v4
55
+
56
+ - name : Setup node with cache
57
+ uses : actions/setup-node@v4
58
+ with :
59
+ node-version : 20
60
+ cache : " npm"
61
+ cache-dependency-path : " **/package-lock.json"
62
+
63
+ - name : Install dependencies
64
+ run : npm install
65
+
66
+ - name : Build App
67
+ run : npm run build
68
+
69
+ - name : Upload frontend build file to artifact
70
+ uses : actions/upload-artifact@v4
71
+ with :
72
+ name : FrontendApplication
73
+ path : frontend/out
74
+
46
75
deploy :
47
- needs : [build-backend]
76
+ needs : [build-backend, build-frontend ]
48
77
runs-on : self-hosted
49
78
50
79
steps :
51
80
- name : Remove previous version FRONT app
52
81
working-directory : frontend/prod/
53
82
run : rm -rf dist
54
83
84
+ - name : Download FRONT build file from artifact
85
+ uses : actions/download-artifact@v4
86
+ with :
87
+ name : FrontendApplication
88
+ path : frontend/prod/
89
+
55
90
- name : Remove previous version BACK jar
56
91
working-directory : backend/prod/
57
92
run : rm -f *.jar
61
96
with :
62
97
name : BackendApplicationJar
63
98
path : backend/prod/
99
+
100
+ - name : Deploy BACK to production server
101
+ working-directory : backend/prod/
102
+ run : ./start.sh
You can’t perform that action at this time.
0 commit comments