Skip to content

Instantly share code, notes, and snippets.

@Copser
Created October 31, 2018 18:41
Show Gist options
  • Save Copser/cdc83d6a5652a8284033d50e95d6ad69 to your computer and use it in GitHub Desktop.
Save Copser/cdc83d6a5652a8284033d50e95d6ad69 to your computer and use it in GitHub Desktop.
stages:
- prepare
- test
- build
- deploy
before_script:
- sudo git clean -ffdx
# prepare env
install_requirements:
stage: prepare
script:
- build/deploy_ci.sh
except:
- develop
- master
# run karma
tests:
stage: test
script:
- npm run test
except:
- develop
- master
# build dist
build:
stage: build
image: node:8.12.0
script:
- npm run build
artifacts:
paths:
- dist/
# deploy dist
deploy:
stage: deploy
script:
- sudo cp -r $CI_PROJECT_DIR/* /srv/itoucan.de/
- cd /srv/itoucan.de
- sudo service supervisor restart
only:
- develop
- master
after_script:
- sudo git clean -ffdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment