tDeploy at gitlab instead of fastmail - andersdamsgaard.com - my photography we… | |
git clone git://src.adamsgaard.dk/andersdamsgaard.com | |
Log | |
Files | |
Refs | |
Submodules | |
README | |
LICENSE | |
--- | |
commit 49566bd769cd122ca7ea5d292784e894c0e8000b | |
parent 6f9e3dd5f6767be043bcb034dd2f7f296283d92d | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 5 Nov 2018 06:29:34 +0100 | |
Deploy at gitlab instead of fastmail | |
Diffstat: | |
M .gitlab-ci.yml | 91 ++++++++++++++++++-----------… | |
M Makefile | 27 +++++++++++++++------------ | |
2 files changed, 68 insertions(+), 50 deletions(-) | |
--- | |
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml | |
t@@ -8,49 +8,64 @@ test: | |
except: | |
- master | |
-deploy-staging: | |
- # image: alpine:edge # https://pkgs.alpinelinux.org/packages?name=&branch=e… | |
- # image: registry.gitlab.com/pages/hugo:latest | |
+pages: | |
image: registry.gitlab.com/plett/hugoextended:0.50 | |
before_script: | |
# - apk --no-cache add make lftp curl npm | |
- apt-get install make lftp curl | |
- hugo version | |
script: | |
- - make deploy-staging | |
- - sleep 15 | |
- - curl --silent --head https://staging.andersdamsgaard.com | |
- - curl --silent --head http://staging.andersdamsgaard.com | |
- - curl --silent https://staging.andersdamsgaard.com > online.html && diff … | |
- after_script: | |
- - du -h public/ | |
- # artifacts: | |
- # paths: | |
- # - public | |
- except: | |
+ - make deploy-gitlab | |
+ artifacts: | |
+ paths: | |
+ - public | |
+ only: | |
- master | |
-deploy: | |
- # image: alpine:edge # https://pkgs.alpinelinux.org/packages?name=&branch=e… | |
- # image: registry.gitlab.com/pages/hugo:latest | |
- image: registry.gitlab.com/plett/hugoextended:0.50 | |
- before_script: | |
- # - apk --no-cache add make lftp curl npm | |
- - apt-get update | |
- - apt-get -y install make lftp curl | |
- - hugo version | |
- script: | |
- - make deploy | |
- - sleep 15 | |
- - 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… | |
- after_script: | |
- - du -h public/ | |
- # artifacts: | |
- # paths: | |
- # - public | |
- only: | |
- - master | |
+ | |
+# deploy-staging: | |
+# # image: alpine:edge # https://pkgs.alpinelinux.org/packages?name=&branch… | |
+# # image: registry.gitlab.com/pages/hugo:latest | |
+# image: registry.gitlab.com/plett/hugoextended:0.50 | |
+# before_script: | |
+# # - apk --no-cache add make lftp curl npm | |
+# - apt-get install make lftp curl | |
+# - hugo version | |
+# script: | |
+# - make deploy-staging | |
+# - sleep 15 | |
+# - curl --silent --head https://staging.andersdamsgaard.com | |
+# - curl --silent --head http://staging.andersdamsgaard.com | |
+# - curl --silent https://staging.andersdamsgaard.com > online.html && dif… | |
+# after_script: | |
+# - du -h public/ | |
+# # artifacts: | |
+# # paths: | |
+# # - public | |
+# except: | |
+# - master | |
+ | |
+# deploy: | |
+# # image: alpine:edge # https://pkgs.alpinelinux.org/packages?name=&branch… | |
+# # image: registry.gitlab.com/pages/hugo:latest | |
+# image: registry.gitlab.com/plett/hugoextended:0.50 | |
+# before_script: | |
+# # - apk --no-cache add make lftp curl npm | |
+# - apt-get update | |
+# - apt-get -y install make lftp curl | |
+# - hugo version | |
+# script: | |
+# - make deploy | |
+# - sleep 15 | |
+# - 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… | |
+# after_script: | |
+# - du -h public/ | |
+# # artifacts: | |
+# # paths: | |
+# # - public | |
+# only: | |
+# - master | |
diff --git a/Makefile b/Makefile | |
t@@ -4,15 +4,24 @@ DOMAIN=andersdamsgaard.com | |
local: | |
hugo server -D | |
+.PHONY: deploy | |
+deploy: deploy-fm | |
+ | |
+.PHONY: deploy-gitlab | |
+deploy-gitlab: generate-public | |
+ | |
+.PHONY: deploy-staging-locally | |
deploy-staging-locally: | |
export FASTMAILKEY=`pass Online/fastmail-files-ftp-password` \ | |
&& make deploy-staging | |
+.PHONY: deploy-locally | |
deploy-locally: | |
export FASTMAILKEY=`pass Online/fastmail-files-ftp-password` \ | |
&& make deploy | |
-deploy-staging: | |
+.PHONY: generate-public | |
+generate-public: | |
# generate public/ | |
hugo | |
# remove unprocessed images | |
t@@ -23,6 +32,9 @@ deploy-staging: | |
-not -name '*fill*.jpg' \ | |
-not -name '*fit*.jpg' \ | |
-delete | |
+ | |
+.PHONY: deploy-staging | |
+deploy-staging: generate-public | |
# upload to fastmail | |
@lftp -c "set ftp:list-options -a; \ | |
open ftp://[email protected]:$(FASTMAILKEY)@ftp.fastmail.com; \ | |
t@@ -30,17 +42,8 @@ deploy-staging: | |
cd /anders.adamsgaard.dk/files/staging.$(DOMAIN); \ | |
mirror --reverse --delete --use-cache --verbose --parallel=2 -p" | |
-deploy: | |
- # generate public/ | |
- hugo | |
- # remove unprocessed images | |
- find public/ \ | |
- -name '.DS_Store' \ | |
- -name '*.jpg' \ | |
- -not -name '*resize*.jpg' \ | |
- -not -name '*fill*.jpg' \ | |
- -not -name '*fit*.jpg' \ | |
- -delete | |
+.PHONY: deploy-fm | |
+deploy-fm: generate-public | |
# upload to fastmail | |
@lftp -c "set ftp:list-options -a; \ | |
open ftp://[email protected]:$(FASTMAILKEY)@ftp.fastmail.com; \ |