image: node stages: - deploy_staging - deploy_preproduction ## STAGING ## deploy_paris_stg: stage: deploy_staging environment: name: paris_stg url: https://staging.test-paris.happy-dev.fr script: - echo "$APP_CONFIG_PARIS_STG" > config.json - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test-paris@ssh-test-paris.happy-dev.fr:~/staging/www/ only: - staging - feat/manager_deploy tags: - sib deploy_nantes: stage: deploy_preproduction environment: name: nantes url: https://test-nantes.happy-dev.fr script: - echo "$APP_CONFIG_NANTES" > config.json - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test-nantes@ssh-test-nantes.happy-dev.fr:~/www/ only: - staging - feat/manager_deploy tags: - sib ## PRODUCTION ## deploy_paris: stage: deploy_preproduction environment: name: paris url: https://test-paris.happy-dev.fr script: - echo "$APP_CONFIG_PARIS" > config.json - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test-paris@ssh-test-paris.happy-dev.fr:~/www/ only: - staging - feat/manager_deploy when: manual tags: - sib