CircleCI auto-deploy?
This commit is contained in:
parent
a608704546
commit
fc06fcb7b3
11
ci-install-hugo.sh
Executable file
11
ci-install-hugo.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
HUGO_VERSION=0.16
|
||||
HUGO_DOWNLOAD=hugo_${HUGO_VERSION}_linux-64bit.tgz
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
# Install Hugo if not already cached or upgrade an old version.
|
||||
if [ ! -e $CIRCLE_BUILD_DIR/bin/hugo ] || ! [[ `hugo version` =~ v${HUGO_VERSION} ]]; then
|
||||
wget https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/${HUGO_DOWNLOAD}
|
||||
tar xvzf ${HUGO_DOWNLOAD} -C $CIRCLE_BUILD_DIR/bin/
|
||||
fi
|
7
ci-install-yuicompressor.sh
Executable file
7
ci-install-yuicompressor.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
set -x
|
||||
set -e
|
||||
|
||||
# Install yuicompressor if not already cached
|
||||
if [ ! -e $CIRCLE_BUILD_DIR/bin/yuicompressor ]; then
|
||||
npm install -g --prefix ${CIRCLE_BUILD_DIR} yuicomporessor
|
||||
fi
|
31
circle.yml
Executable file
31
circle.yml
Executable file
|
@ -0,0 +1,31 @@
|
|||
machine:
|
||||
environment:
|
||||
CIRCLE_BUILD_DIR: $HOME/$CIRCLE_PROJECT_REPONAME
|
||||
PATH: $PATH:$CIRCLE_BUILD_DIR/bin
|
||||
post:
|
||||
- mkdir -p $CIRCLE_BUILD_DIR/bin
|
||||
|
||||
general:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- bash ./ci-install-hugo.sh
|
||||
- bash ./ci-install-yuicompressor.sh
|
||||
cache_directories:
|
||||
- bin
|
||||
|
||||
test:
|
||||
override:
|
||||
- hugo -v
|
||||
- yuicompressor themes/outerspace/static/css/outerspace.css -o themes/outerspace/static/css/outerspace-min.css
|
||||
|
||||
deployment:
|
||||
master:
|
||||
branch: master
|
||||
commands:
|
||||
- rsync -aqz --delete-after --no-progress public/ -e ssh $RSYNC_TARGET
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user