tAdd separate test and deploy-staging - andersdamsgaard.com - my photography we… | |
git clone git://src.adamsgaard.dk/andersdamsgaard.com | |
Log | |
Files | |
Refs | |
Submodules | |
README | |
LICENSE | |
--- | |
commit 507660229e07632ab6da8191f8d41a5b6fb1ed14 | |
parent 8a7ea5d339ddc3f5c3d957399b71dbc1b3d15c28 | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
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=ed… | |
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: |