deploy-testing: stage: deploy script: - npm install - npm run clean - npm run build - rm -rf ./built/public/default - rm -rf ./built/routes/cert - rm -rf ./built/views - cp -R ./public/default ./built/public - cp -R ./routes/cert ./built/routes - cp -R ./views ./built - cat $configfiledev > ./built/config/config.js - cat $cert > ./built/routes/cert/cert.pem - cat $certidp > ./built/routes/cert/cert_idp.pem - cat $key > ./built/routes/cert/key.pem - "pm2 delete --silent account || :" - pm2 start ./built/app.js --name=account - pm2 save tags: - testing only: - testing deploy-master: stage: deploy script: - npm install - npm run clean - npm run build - rm -rf ./built/public/default - rm -rf ./built/routes/cert - rm -rf ./built/views - cp -R ./public/default ./built/public - cp -R ./routes/cert ./built/routes - cp -R ./views ./built - cat $configfiledev > ./built/config/config.js - cat $cert > ./built/routes/cert/cert.pem - cat $certidp > ./built/routes/cert/cert_idp.pem - cat $key > ./built/routes/cert/key.pem - "pm2 delete --silent account || :" - pm2 start ./built/app.js --name=account - pm2 save tags: - production only: - master