image: alpine:latest

variables:
  HEROKU_APP_NAME: reddio-next

stages:
  - build
  - e2e
  - deploy

job_build_cljs:
  image: clojure:lein-2.7.1
  stage: build
  script:
    - lein cljsbuild once min
  artifacts:
    paths:
      - resources/public/js/compiled

job_build_js:
  image: node:6.10.0
  stage: build
  script:
    - ./scripts/install-yarn.sh
    - yarn install
    - npm run frontend:build
  artifacts:
    paths:
      - resources/public/js/compiled
      - resources/public/css/compiled

job_e2e:
  stage: e2e
  script:
    - cd resources/public/js && ls -la
  artifacts:
    paths:
      - resources/public

job_deploy_frontend:
  image: node:6.10.0
  stage: deploy
  environment:
    name: production
  only:
    - master
  script:
    - ./scripts/install-yarn.sh
    - yarn install -g firebase-tools
    - firebase deploy --token $FIREBASE_TOKEN

job_deploy_server:
  image: ruby:2.1
  stage: deploy
  environment:
    name: production
  only:
    - master
  script:
    - gem install dpl && dpl
        --strategy=git
        --app=$HEROKU_APP_NAME
        --provider=heroku
        --api-key=$HEROKU_AUTH_TOKEN

image: alpine:latest

variables:
  HEROKU_APP_NAME: reddio-next

stages:
  - build
  - e2e
  - deploy

job_build_cljs:
  image: clojure:lein-2.7.1
  stage: build
  script:
    - lein cljsbuild once min
  artifacts:
    paths:
      - resources/public/js/compiled

job_build_js:
  image: node:6.10.0
  stage: build
  script:
    - ./scripts/install-yarn.sh
    - yarn install
    - npm run frontend:build
  artifacts:
    paths:
      - resources/public/js/compiled
      - resources/public/css/compiled

job_e2e:
  stage: e2e
  script:
    - cd resources/public/js && ls -la
  artifacts:
    paths:
      - resources/public

job_deploy_frontend:
  image: node:6.10.0
  stage: deploy
  environment:
    name: production
  only:
    - master
  script:
    - ./scripts/install-yarn.sh
    - yarn global add firebase-tools
    - firebase deploy --token $FIREBASE_TOKEN

job_deploy_server:
  image: ruby:2.1
  stage: deploy
  environment:
    name: production
  only:
    - master
  script:
    - gem install dpl && dpl
        --strategy=git
        --app=$HEROKU_APP_NAME
        --provider=heroku
        --api-key=$HEROKU_AUTH_TOKEN

Fix firebase tools install command
Fix firebase tools install command
