Skip to content

Instantly share code, notes, and snippets.

@r3nya r3nya/.gitlab-ci.yml
Created May 11, 2016

Embed
What would you like to do?
Simple config for gitlab ci
variables:
COMMON_DIRECTOTY: /var/www/frontend
STATIC_DIRECTORY: $COMMON_DIRECTOTY/static
before_script:
- npm set progress=false
- npm install --silent
stages:
- build
- clean_up
build_and_deploy:
stage: build
script:
- npm run build:qa
- sudo rm -rf $STATIC_DIRECTORY
- sudo mkdir -p $STATIC_DIRECTORY
- sudo cp -v $CI_PROJECT_DIR/dist/* $STATIC_DIRECTORY
- sudo cp -v $CI_PROJECT_DIR/index.html $COMMON_DIRECTOTY
only:
- master
clean_up_job:
stage: clean_up
script:
- rm -rf node_modules
- rm -rf ~/.node-gyp
when: on_failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.