.gitlab-ci.yml 606 Bytes
Newer Older
Wolfgang Knopki's avatar
Wolfgang Knopki committed
1
pages-testing:    
Wolfgang Knopki's avatar
Wolfgang Knopki committed
2
3
  stage: deploy
  script:
Wolfgang Knopki's avatar
Wolfgang Knopki committed
4
    - cat $configfiledev > ./config/config.js
Wolfgang Knopki's avatar
Wolfgang Knopki committed
5
    - npm install
Rosanny Sihombing's avatar
Rosanny Sihombing committed
6
7
8
9
    - [npm run clean]
    - [npm run build]
    - [copy views/ dir to built/]
    - [cd built]
Wolfgang Knopki's avatar
Wolfgang Knopki committed
10
11
12
13
14
15
    - "pm2 delete --silent project || :"
    - pm2 start ./app.js --name=project
    - pm2 save
  tags: 
    - testing
  only: 
Wolfgang Knopki's avatar
Wolfgang Knopki committed
16
17
    - testing
    
Wolfgang Knopki's avatar
Wolfgang Knopki committed
18
pages-production:    
Wolfgang Knopki's avatar
Wolfgang Knopki committed
19
20
  stage: deploy
  script:
Wolfgang Knopki's avatar
Wolfgang Knopki committed
21
    - cat $configfiledev > ./config/config.js
Wolfgang Knopki's avatar
Wolfgang Knopki committed
22
23
24
25
26
27
28
29
    - npm install
    - "pm2 delete --silent project || :"
    - pm2 start ./app.js --name=project
    - pm2 save
  tags: 
    - production
  only: 
    - master