.gitlab-ci.yml 1000 Bytes
Newer Older
okhin's avatar
okhin committed
1 2 3 4 5 6 7 8 9 10
stages:
        - deploy

deploy preprod:
        variables:
                BASE_PATH: /srv/generateur-slogans
        stage: deploy
        tags: [preprod]
        script: 
                - rsync -ruvC ./ $BASE_PATH
11
                - cd $BASE_PATH
okhin's avatar
okhin committed
12
                - rm -rf node_modules/
13
                - npm install
Thibaut Broggi's avatar
Thibaut Broggi committed
14
                - cp config.json.default config.json
okhin's avatar
okhin committed
15 16
                - sudo /usr/bin/pm2 restart slogan
                - sudo /usr/bin/pm2 show slogan
17 18
        only:
                - master
okhin's avatar
okhin committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

deploy prod:
        variables:
                BASE_PATH: /srv/soutien/generateur-slogans
        stage: deploy
        tags: [prod]
        script: 
                - rsync -ruvC ./ $BASE_PATH
                - cd $BASE_PATH
                - rm -rf node_modules/
                - npm install
                - cp config.json.default config.json
                - sudo /usr/bin/pm2 restart slogan
                - sudo /usr/bin/pm2 show slogan
        only:
                - master