pages-testing:    
  stage: deploy
  script:
    - npm install
    - npm run clean
    - npm run build
    - rm -rf ./built/views
    - cp -R ./src/views ./built
    - cat $configfiledev > ./built/config/config.js
    - "pm2 delete --silent project || :"
    - pm2 start ./built/app.js --name=project
    - pm2 save
  tags: 
    - testing
  only: 
    - testing
    
pages-production:    
  stage: deploy
  script:
    - cat $configfiledev > ./config/config.js
    - npm install
    - "pm2 delete --silent project || :"
    - pm2 start ./app.js --name=project
    - pm2 save
  tags: 
    - production
  only: 
    - master
