From 2fddf4938ae35ce2b9017f89e6bda9bca396600d Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 21 Apr 2018 11:35:04 +0200 Subject: [PATCH] CI tweaks --- .gitlab-ci.yml | 28 ++++++++++++++-------------- src/components/atoms/Head.js | 4 +--- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9798a14..7e378f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,19 +1,17 @@ -image: node:latest - cache: paths: - node_modules/ -before_script: - - npm i -g gatsby-cli - - export PATH="$PATH:/usr/local/bin/gatsby" - stages: - - testing + - build + - deploy -testing: - stage: test +build: + image: node:latest + stage: build script: + - npm i -g gatsby-cli + - export PATH="$PATH:/usr/local/bin/gatsby" - npm i - npm test - npm run build @@ -21,8 +19,10 @@ testing: paths: - public -# deployment: -# stage: deploy -# script: aws s3 sync ./public s3://beta.matthiaskretschmann.com --delete --acl public-read -# only: -# - master +deploy: + image: garland/aws-cli-docker:latest + stage: deploy + script: + - aws s3 sync ./public s3://beta.matthiaskretschmann.com --delete --acl public-read + only: + - master diff --git a/src/components/atoms/Head.js b/src/components/atoms/Head.js index 5151130..80d685d 100644 --- a/src/components/atoms/Head.js +++ b/src/components/atoms/Head.js @@ -19,9 +19,7 @@ class Head extends React.Component { - {window.location.protocol + '//' + window.location.hostname !== `${url}` && - - } + ) }