2018-03-18 20:55:58 +01:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- node_modules/
|
2018-05-08 21:42:19 +02:00
|
|
|
- public/
|
2018-03-18 20:55:58 +01:00
|
|
|
|
2018-04-21 02:09:08 +02:00
|
|
|
stages:
|
2018-04-21 11:35:04 +02:00
|
|
|
- build
|
|
|
|
- deploy
|
2018-04-21 02:09:08 +02:00
|
|
|
|
2018-04-21 11:35:04 +02:00
|
|
|
build:
|
|
|
|
image: node:latest
|
|
|
|
stage: build
|
2018-03-18 20:55:58 +01:00
|
|
|
script:
|
2018-04-21 11:35:04 +02:00
|
|
|
- npm i -g gatsby-cli
|
|
|
|
- export PATH="$PATH:/usr/local/bin/gatsby"
|
2018-04-08 00:19:54 +02:00
|
|
|
- npm i
|
2018-03-18 20:55:58 +01:00
|
|
|
- npm test
|
2018-04-11 20:51:04 +02:00
|
|
|
- npm run build
|
2018-04-08 13:53:49 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
2018-04-21 02:09:08 +02:00
|
|
|
|
2018-04-21 11:35:04 +02:00
|
|
|
deploy:
|
|
|
|
image: garland/aws-cli-docker:latest
|
|
|
|
stage: deploy
|
|
|
|
script:
|
2018-05-07 22:27:03 +02:00
|
|
|
- aws s3 sync --delete --acl public-read ./public s3://matthiaskretschmann.com
|
2018-04-21 11:35:04 +02:00
|
|
|
only:
|
|
|
|
- master
|