Skip to content

Instantly share code, notes, and snippets.

@wpscholar wpscholar/config.yml
Created Apr 22, 2019

Embed
What would you like to do?
CircleCI Rsync Deployment
version: 2
jobs:
build_and_deploy:
docker:
- image: circleci/php:7.1-node-browsers
steps:
- checkout
- run: sudo apt update
- run: sudo apt-get install rsync
- run: sudo docker-php-ext-install zip
- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.lock" }}
- v1-dependencies-
- run: composer install --no-interaction --no-dev --prefer-dist --optimize-autoloader
- save_cache:
key: v1-dependencies-{{ checksum "composer.lock" }}
paths:
- ./vendor
- add_ssh_keys:
fingerprints:
- ba:f5:b5:c4:68:f7:ed:2a:bc:8f:05:cd:57:f4:b3:53
- run:
name: Deploy Over SSH
command: |
rsync . -acvz --delete-after --force --include-from=.circleci/.rsyncinclude --exclude-from=.circleci/.rsyncignore -e "ssh -i ba:f5:b5:c4:68:f7:ed:2a:bc:8f:05:cd:57:f4:b3:53 -o 'StrictHostKeyChecking no'" $SSH_USER@$SSH_HOST:public_html --chmod=D755,F644
workflows:
version: 2
workflow:
jobs:
- build_and_deploy:
filters:
branches:
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.