-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwercker.yml
26 lines (22 loc) · 914 Bytes
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# source
# https://gettingthingstech.com/how-to-deploy-a-hugo-site-to-digitalocean-automatically-with-wercker/
# https://josephstahl.com/blog/2015/04/24/publishing-a-hugo-blog-to-digitalocean-with-wercker/
box: node
build:
steps:
- install-packages:
packages: openssh-client rsync
- add-to-known_hosts:
hostname: $HOSTNAME
- mktemp:
envvar: PRIVATE_KEYPATH
- create-file:
name: write key
filename: $PRIVATE_KEYPATH
content: $WERCKER_PRIVATE
overwrite: true
- script:
name: transfer files
code: |
rsync -au -e "ssh -i $PRIVATE_KEYPATH -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress . $USER@$HOSTNAME:/var/www/demos.frontendlabs
ssh -i $PRIVATE_KEYPATH -l $USER -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $HOSTNAME chown -R www-data:www-data /var/www/