From 0c702aa60b3578613a3b15da184aead8bb988d62 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Thu, 6 May 2021 22:48:30 +0900 Subject: [PATCH] Move to production. --- .drone.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2c9de8c..5b1871e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,6 +9,16 @@ steps: - grep -l -r ecx.images-amazon.com content/ | sort | uniq | xargs -t --no-run-if-empty sed -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g" - grep -l -r "http://www.amazon.co.jp/exec" content/ | sort | uniq | xargs -t --no-run-if-empty sed -i -e "s/http:\/\/www.amazon.co.jp\/exec/https:\/\/www.amazon.co.jp\/exec/g" + - name: generate-ogp-images + image: reg.kazu634.com/kazu634/tcardgen:v0.3 + commands: + - wget 'https://github.com/yuru7/HackGen/releases/download/v2.3.0/HackGenNerd_v2.3.0.zip' -O /tmp/font.zip + - unzip /tmp/font.zip -d /tmp/font + - find /tmp/font -type f -name *.ttf | xargs -I% -n 1 cp -p % assets/font/ + - find content/ -type f -name '*.md' | grep -v '_index' | xargs -n 1 /usr/local/bin/tcardgen -f assets/font/ -o static/ogp/ -c assets/tcardgen.yaml > /dev/null + - find static/ogp/ -type f -name '*.png' | xargs -n 1 -I% basename % .png | xargs -I% -n 1 img2webp -lossy -q 50 static/ogp/%.png -o static/ogp/%.webp > /dev/null + - find static/ogp/ -type f -name '*.png' | xargs --no-run-if-empty rm + - name: hugo image: cibuilds/hugo:0.83.0 commands: @@ -62,16 +72,6 @@ steps: - grep -l -r ecx.images-amazon.com content/ | sort | uniq | xargs -t --no-run-if-empty sed -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g" - grep -l -r "http://www.amazon.co.jp/exec" content/ | sort | uniq | xargs -t --no-run-if-empty sed -i -e "s/http:\/\/www.amazon.co.jp\/exec/https:\/\/www.amazon.co.jp\/exec/g" - - name: generate-ogp-images - image: reg.kazu634.com/kazu634/tcardgen:v0.3 - commands: - - wget 'https://github.com/yuru7/HackGen/releases/download/v2.3.0/HackGenNerd_v2.3.0.zip' -O /tmp/font.zip - - unzip /tmp/font.zip -d /tmp/font - - find /tmp/font -type f -name *.ttf | xargs -I% -n 1 cp -p % assets/font/ - - find content/ -type f -name '*.md' | grep -v '_index' | xargs -n 1 /usr/local/bin/tcardgen -f assets/font/ -o static/ogp/ -c assets/tcardgen.yaml > /dev/null - - find static/ogp/ -type f -name '*.png' | xargs -n 1 -I% basename % .png | xargs -I% -n 1 -t img2webp -lossy -q 50 static/ogp/%.png -o static/ogp/%.webp > /dev/null - - find static/ogp/ -type f -name '*.png' | xargs --no-run-if-empty rm - - name: hugo image: cibuilds/hugo:0.83.0 commands: