.gitlab-ci.yml 735 Bytes
Newer Older
Nicholas J Anderson's avatar
Nicholas J Anderson committed
1
2
image: node:6.5.0

3
4
5
6
stages:
  - build
  - deploy

Nicholas J Anderson's avatar
Nicholas J Anderson committed
7
8
build:
  stage: build
9
  variables:
10
    API_GET_FACILITIES: "https://api.srct.gmu.edu/whatsopen/v2/facilities/"
Nicholas J Anderson's avatar
Nicholas J Anderson committed
11
  script:
12
  - npm install -g yarn
13
  - >
14
    sed "s|^const API_GET_FACILITIES .*|const API_GET_FACILITIES = '$API_GET_FACILITIES';|" -i src/actions/api.js
15
  - yarn install
16
  - CI=false npm run build
Nicholas J Anderson's avatar
Nicholas J Anderson committed
17
18
19
20
  artifacts:
    paths:
    - build

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
deploy_staging:
  stage: deploy
  script: echo "Deploy bot awayyyyy"
  environment:
    name: staging
    url: https://whatsopen.gmu.io
  only:
    - master

deploy_production:
  stage: deploy
  script: echo "Deploy bot awayyyyy"
  environment:
    name: production
    url: https://whatsopen.gmu.edu
  when: manual
  only:
    - master