-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
44 lines (40 loc) · 1.06 KB
/
.gitlab-ci.yml
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
stages:
- dependencies
- deploy
install_dependencies_angular:
stage: dependencies
image: node
before_script:
- export http_proxy="http://192.168.102.61:82/"
- export https_proxy="http://192.168.102.61:82/"
- cd frontend
script:
- npm ci --prefer-offline --no-audit
artifacts:
paths:
- frontend/node_modules
expire_in: 1 days
only:
- main
deploy_backend:
stage: deploy
before_script:
- sudo -u www-data /bin/rm -rf /var/www/backend/*.php
script:
- sudo -u www-data /bin/cp -r backend/*.php /var/www/backend/
tags:
- chartes
only:
- main
deploy_frontend:
stage: deploy
script:
- cd frontend
- sudo /usr/bin/ng build
- cd ../ && sudo /bin/chown gitlab-runner frontend -R
- sudo /bin/rm -rf /var/www/frontend/*
- sudo -u www-data /bin/cp -r ./frontend/* /var/www/frontend/
tags:
- chartes
only:
- main