Skip to content

Instantly share code, notes, and snippets.

@tanmayk
Last active August 6, 2020 10:11
Show Gist options
  • Save tanmayk/20f59023fe56c212b4bcc8aa9eb497a4 to your computer and use it in GitHub Desktop.
Save tanmayk/20f59023fe56c212b4bcc8aa9eb497a4 to your computer and use it in GitHub Desktop.
version: 2
jobs:
build:
docker:
- image: osseed/drupal8:7.2
- image: circleci/mysql:5.7
environment:
MYSQL_DATABASE: drupal
MYSQL_ROOT_USERNAME: root
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: "%"
working_directory: ~/drupal-circleci
steps:
- checkout:
- run:
name: "Install Dependencies"
command: |
composer install
- run:
name: "Site Setup"
command: |
cp .circleci/env/settings.local.php web/sites/default/
cp web/sites/default/settings.dev web/sites/default/settings.php
./vendor/bin/drush si standard -y --verbose
./vendor/bin/drush cim -y --verbose
deploy:
machine:
enabled: true
steps:
- add_ssh_keys
- run:
name: "Deployment"
command: |
ssh USERNAME@SERVER_HOST "sh /PATH/TO/SCRIPT/deploy.sh"
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