Skip to content

Instantly share code, notes, and snippets.

@favasconcelos
Forked from josephrace/.gitlab-ci.yml
Created October 27, 2018 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save favasconcelos/a8ea9f2237b1e7a19717bd1e4b929c7e to your computer and use it in GitHub Desktop.
Save favasconcelos/a8ea9f2237b1e7a19717bd1e4b929c7e to your computer and use it in GitHub Desktop.
Configuration file for create-react-app on GitLab Pages
image: node:7.9.0 # change to match your node version
cache:
paths:
- node_modules/
before_script:
- npm install
test:
stage: test
script:
- CI=true npm test
pages:
stage: deploy
script:
- CI=true npm run build
- rm -rf public
- mv build public
artifacts:
paths:
- public # GitLab pages serve from a 'public' directory
only:
- master # run on master branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment