.gitlab-ci.yml 1.11 KB
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
  artifacts:
    paths:
    - build
Nicholas J Anderson's avatar
Nicholas J Anderson committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    
build_shopmason:
  stage: build
  variables:
    API_GET_FACILITIES: "https://api.srct.gmu.edu/whatsopen/v2/facilities/?facility_classifier=shopmason"
  script:
  - npm install -g yarn
  - >
    sed "s|^const API_GET_FACILITIES .*|const API_GET_FACILITIES = '$API_GET_FACILITIES';|" -i src/actions/api.js
  - yarn install
  - CI=false npm run build
  artifacts:
    paths:
    - build
  when: manual
Nicholas J Anderson's avatar
Nicholas J Anderson committed
35

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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