Created
September 1, 2014 14:42
-
-
Save madr/5f43ef6cc10afb8df1fd to your computer and use it in GitHub Desktop.
Automated Wordpress FTP deployment using composer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "http://wpackagist.org" | |
}, | |
{ | |
"type": "package", | |
"package": { | |
"name": "wordpress", | |
"type": "webroot", | |
"version": "3.8", | |
"dist": { | |
"type": "zip", | |
"url": "https://github.com/WordPress/WordPress/archive/3.8.zip" | |
}, | |
"require" : { | |
"fancyguy/webroot-installer": "1.0.0" | |
} | |
} | |
} | |
], | |
"require": { | |
"php": ">=5.3.0", | |
"dg/ftp-deployment": "v1.3", | |
"fancyguy/webroot-installer": "1.0.0" | |
}, | |
"extra": { | |
"webroot-dir": "wp", | |
"webroot-package": "wordpress" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[my site] ; There may be more than one section | |
; remote FTP server | |
remote = ftp://<user>:<password>@<domain>/<dir> | |
; FTP passive mode | |
passivemode = yes | |
; local path (optional) | |
local = wp | |
; run in test-mode? (can be enabled by option -t or --test too) | |
test = no | |
; files and directories to ignore | |
ignore = " | |
.git* | |
project.pp[jx] | |
/deployment.* | |
/log | |
temp/* | |
!temp/.htaccess | |
wp-config.php | |
*.less | |
less.js | |
wpcontent/* | |
!wpcontent/themes | |
" | |
; is allowed to delete remote files? (defaults to yes) | |
allowdelete = no | |
; jobs to run before file upload | |
; before[] = http://example.com/deployment.php?before | |
; jobs to run after file upload | |
; after[] = http://example.com/deployment.php?after | |
; directories to purge after file upload | |
; purge[] = temp/cache | |
; files to preprocess (defaults to *.js *.css) | |
preprocess = no | |
; directory for temporary files (defaults to system's temporary directory) | |
tempdir = /tmp/deployment | |
; enable colored highlights? (defaults to autodetect) | |
colors = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install: | |
composer install | |
composer update | |
deploy: | |
php vendor/bin/deployment deployment.ini | |
test-deploy: | |
php vendor/bin/deployment deployment.ini --test | |
.PHONY: install deploy test-deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment