Skip to content

Instantly share code, notes, and snippets.

@paulobunga
Created December 17, 2019 20:36
Show Gist options
  • Save paulobunga/773782cc20042a570be27207ee18f55b to your computer and use it in GitHub Desktop.
Save paulobunga/773782cc20042a570be27207ee18f55b to your computer and use it in GitHub Desktop.
Circle CI configuration script
version: 2
jobs:
build:
docker:
- image: circleci/php:7.3-apache-node-browsers
working_directory: ~/ci_deploy
steps:
- checkout
- run: echo "Continuos deployment started"
deploy:
machine:
enabled: true
working_directory: ~/ci_deploy
steps:
- run:
name: Copy files to server
command: |
ssh $SSH_USER@$SSH_HOST "cd /var/www/html && rm * -rf && git clone https://$GIT_USER:[email protected]/paulobunga/ci_deploy.git"
workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment