nim-by-example/wercker.yml
Flaviu Tamas 89c4bb2625 Fix deploy
2016-11-07 15:45:37 -05:00

31 lines
1.5 KiB
YAML

box: flaviut/nim-by-example-build-vm:0.1.2
build:
steps:
- script:
name: build
code: |
source /usr/local/rvm/scripts/rvm
git remote add publish 'git@github.com:nim-by-example/nim-by-example.github.io.git'
git config --global user.email 'nim-by-example.github.io'
git config --global user.name 'Builder'
git config --global push.default simple
git checkout master
nanoc
cp -r ./output/. ./
rm -rf ./output/ ./content/ ./layouts/ ./lib/ .gitignore README.md Rules nanoc.yaml wercker.yml
git add --all .
git commit -am'Build Site'
deploy:
steps:
- script:
name: ssh-keys
code: |
mkdir -p ~/.ssh/
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' > ~/.ssh/known_hosts
echo -e "$GIT_CREDENTIALS" > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
chmod 0644 ~/.ssh/known_hosts
- script:
name: deploy
code: |
git push --force publish