tAdd separate test and deploy-staging - andersdamsgaard.com - my photography webpage (HTM) git clone git://src.adamsgaard.dk/andersdamsgaard.com (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules (DIR) README (DIR) LICENSE --- (DIR) commit 507660229e07632ab6da8191f8d41a5b6fb1ed14 (DIR) parent 8a7ea5d339ddc3f5c3d957399b71dbc1b3d15c28 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Fri, 2 Nov 2018 14:21:50 +0100 Add separate test and deploy-staging Diffstat: M .gitlab-ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) --- (DIR) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml t@@ -1,7 +1,14 @@ variables: GIT_SUBMODULE_STRATEGY: recursive -deploy: +test: + image: registry.gitlab.com/pages/hugo:latest + script: + - hugo + except: + - master + +deploy-staging: #image: alpine:edge # https://pkgs.alpinelinux.org/packages?name=&branch=edge image: registry.gitlab.com/pages/hugo:latest before_script: t@@ -10,13 +17,9 @@ deploy: script: - make deploy-staging - sleep 15 - - curl --silent --head https://andersdamsgaard.com | head -n 1 | \ + - curl --silent --head https://staging.andersdamsgaard.com | head -n 1 | \ grep '200' - - curl --silent --head https://www.andersdamsgaard.com | head -n 1 | \ - grep '302' - - curl --silent --head http://andersdamsgaard.com | head -n 1 | \ - grep '302 Found' - - curl --silent --head http://www.andersdamsgaard.com | head -n 1 | \ + - curl --silent --head http://staging.andersdamsgaard.com | head -n 1 | \ grep '302 Found' # artifacts: # paths: