Modify production part as well.

This commit is contained in:
Kazuhiro MUSASHI 2020-02-16 23:08:57 +08:00
parent 3e1b3d2f3f
commit f349d21677
1 changed files with 3 additions and 4 deletions

View File

@ -4,7 +4,7 @@ name: production
steps: steps:
- name: Modify-Amazon-Links - name: Modify-Amazon-Links
image: cibuilds/hugo:0.64.1 image: alpine:3.9
commands: commands:
- 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 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" - 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"
@ -12,10 +12,10 @@ steps:
- name: hugo - name: hugo
image: cibuilds/hugo:0.64.1 image: cibuilds/hugo:0.64.1
commands: commands:
- hugo --cacheDir /tmp -e staging -v -s . - sudo hugo -e production -v -s .
- name: Compress-the-Assets - name: Compress-the-Assets
image: cibuilds/hugo:0.64.1 image: alpine:3.9
commands: commands:
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do gzip -c ${TARGET} > ${TARGET}.gz; done - for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do gzip -c ${TARGET} > ${TARGET}.gz; done
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do rm -f ${TARGET}; done - for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do rm -f ${TARGET}; done
@ -58,7 +58,6 @@ name: staging
steps: steps:
- name: Modify-Amazon-Links - name: Modify-Amazon-Links
user: root
image: alpine:3.9 image: alpine:3.9
commands: commands:
- 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 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"