-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
37 lines (32 loc) · 938 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Using the node alpine image to build the React app
image: node:alpine
# Announce the URL as per CRA docs
# https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration
variables:
PUBLIC_URL: /
# Cache node modules - speeds up future builds
cache:
paths:
- node_modules
# Name the stages involved in the pipeline
stages:
- prod
deploy_prod:
stage: prod
variables:
www_dir: "/var/www/cornblaster.com"
tags:
- cornblaster
script:
#- "curl -X POST -F token=ea99b96486c9b2fca5fe7cc6107392 -F ref=master https://git.streetscrape.com/api/v4/projects/43/trigger/pipeline"
- "echo $www_dir"
- "pwd"
- "echo $env"
- "npm install"
- "CI=false npm run build --prod"
- "sudo -H chown :www-data $www_dir -R"
- "sudo cp build/* $www_dir/ -R"
allow_failure: true
only:
- master
- devel/add_routes_and_different_overlays