Decide not to use dependency.
This commit is contained in:
parent
8e6e2edd62
commit
a99ff7376a
58
.drone.yml
58
.drone.yml
|
@ -1,6 +1,6 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: preprocess
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Modify-Amazon-Links
|
- name: Modify-Amazon-Links
|
||||||
|
@ -9,61 +9,18 @@ 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 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"
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: generate-staging
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: hugo
|
- name: hugo
|
||||||
image: cibuilds/hugo:0.62.1
|
image: cibuilds/hugo:0.62.1
|
||||||
commands:
|
commands:
|
||||||
- hugo -e staging -v -s .
|
- if [ "${DRONE_BRANCH}" != "master" ]; then hugo -e staging -v -s .; else hugo -e production -v -s .; fi
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
exclude:
|
|
||||||
- master
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- preprocess
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: generate-production
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: hugo
|
|
||||||
image: cibuilds/hugo:0.62.1
|
|
||||||
commands:
|
|
||||||
- hugo -v -s .
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
exclude:
|
|
||||||
- master
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- preprocess
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: compress-deploy
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Compress-the-Assets
|
- name: Compress-the-Assets
|
||||||
image: cibuilds/hugo:0.62.1
|
image: cibuilds/hugo:0.62.1
|
||||||
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 ${TARGET}; done
|
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do rm ${TARGET}; done
|
||||||
|
|
||||||
- name: scp files
|
- name: scp
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
settings:
|
settings:
|
||||||
host: 10.0.1.166
|
host: 10.0.1.166
|
||||||
|
@ -71,8 +28,9 @@ steps:
|
||||||
port: 10022
|
port: 10022
|
||||||
target: /var/www/blog
|
target: /var/www/blog
|
||||||
source: public/
|
source: public/
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
|
||||||
depends_on:
|
trigger:
|
||||||
- generate-staging
|
event:
|
||||||
- generate-production
|
- push
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue