Introduction
Introduction Statistics Contact Development Disclaimer Help
tDo not grep status codes, diff index against local build - andersdamsgaard.com…
git clone git://src.adamsgaard.dk/andersdamsgaard.com
Log
Files
Refs
Submodules
README
LICENSE
---
commit f2df9a7cd29bd3c458551a4896cf3867f0f392d2
parent 507660229e07632ab6da8191f8d41a5b6fb1ed14
Author: Anders Damsgaard <[email protected]>
Date: Fri, 2 Nov 2018 14:34:25 +0100
Do not grep status codes, diff index against local build
Diffstat:
M .gitlab-ci.yml | 24 ++++++++++--------------
M Makefile | 10 ++++++++--
2 files changed, 18 insertions(+), 16 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
t@@ -12,15 +12,14 @@ deploy-staging:
#image: alpine:edge # https://pkgs.alpinelinux.org/packages?name=&branch=ed…
image: registry.gitlab.com/pages/hugo:latest
before_script:
- - apk --no-cache add make lftp curl grep
+ - apk --no-cache add make lftp curl
- hugo version
script:
- make deploy-staging
- sleep 15
- - curl --silent --head https://staging.andersdamsgaard.com | head -n 1 | \
- grep '200'
- - curl --silent --head http://staging.andersdamsgaard.com | head -n 1 | \
- grep '302 Found'
+ - curl --silent --head https://staging.andersdamsgaard.com
+ - curl --silent --head http://staging.andersdamsgaard.com
+ - curl --silent https://staging.andersdamsgaard.com > online.html && diff …
# artifacts:
# paths:
# - public
t@@ -31,19 +30,16 @@ deploy:
#image: alpine:edge # https://pkgs.alpinelinux.org/packages?name=&branch=ed…
image: registry.gitlab.com/pages/hugo:latest
before_script:
- - apk --no-cache add make lftp curl grep
+ - apk --no-cache add make lftp curl
- hugo version
script:
- make deploy
- sleep 15
- - curl --silent --head https://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 | \
- grep '302 Found'
+ - curl --silent --head https://andersdamsgaard.com
+ - curl --silent --head https://www.andersdamsgaard.com
+ - curl --silent --head http://andersdamsgaard.com
+ - curl --silent --head http://www.andersdamsgaard.com
+ - curl --silent https://andersdamsgaard.com > online.html && diff online.h…
# artifacts:
# paths:
# - public
diff --git a/Makefile b/Makefile
t@@ -4,21 +4,27 @@ DOMAIN=andersdamsgaard.com
local:
hugo server -D
+deploy-staging-locally:
+ export FASTMAILKEY=`pass Online/fastmail-files-ftp-password` \
+ && make deploy-staging
+
deploy-locally:
- export FASTMAILKEY=`pass Online/fastmail-files-ftp-password` && make d…
+ export FASTMAILKEY=`pass Online/fastmail-files-ftp-password` \
+ && make deploy
deploy-staging:
# generate public/
hugo
# remove unprocessed images
find public/ \
+ -name '.DS_Store' \
-name '*.jpg' -not -name '*resize*.jpg' -not -name '*box*.jpg'…
-delete
# upload to fastmail
lftp -c "set ftp:list-options -a; \
open ftp://[email protected]:$(FASTMAILKEY)@ftp.fastmail.com; \
lcd ./public; \
- cd /anders.staging.adamsgaard.dk/files/$(DOMAIN); \
+ cd /anders.adamsgaard.dk/files/staging.$(DOMAIN); \
mirror --reverse --delete --use-cache --verbose --parallel=2 -p"
deploy:
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.