.gitlab-ci.yml 874 Bytes
Newer Older
1
image: node:latest
2

3
build:
David Haynes's avatar
David Haynes committed
4
  script:
5 6
    - yarn
    - npm install -g gulp
David Haynes's avatar
David Haynes committed
7 8 9 10 11
    - gulp build
  artifacts:
    paths:
      - build/js
      - build/css
David Haynes's avatar
David Haynes committed
12 13
  only:
    - master
14 15 16

pages:
  script:
17 18
    - yarn
    - npm install -g gulp
19
    - gulp build
David Haynes's avatar
David Haynes committed
20 21
    - mkdir public
    - mv build/* public
22 23
  artifacts:
    paths:
David Haynes's avatar
David Haynes committed
24
      - public
David Haynes's avatar
David Haynes committed
25 26
  only:
    - master
27 28 29 30

deploy:
  image: python:latest
  script:
David Haynes's avatar
David Haynes committed
31
  - pip install s3cmd 
32 33
  - s3cmd put ./build/css/ s3://srct/masonstrap/ --recursive --host='nyc3.digitaloceanspaces.com' --host-bucket='%(bucket)s.nyc3.digitaloceanspaces.com' --exclude='*' --include='*.min.css' --acl-public -m 'text/css'
  - s3cmd put ./build/js/ s3://srct/masonstrap/ --recursive --host='nyc3.digitaloceanspaces.com' --host-bucket='%(bucket)s.nyc3.digitaloceanspaces.com' --exclude='*' --include='*.min.js' --acl-public -m 'application/javascript'
34 35
  only:
  - master