- Go to the
www
directory of Vagrant - Clone this repo, change
MyApp
to the real project name - Find & replace
example-project
with the real project name - Provision
git clone https://github.com/nikosolihin/wp-starter.git MyApp && cd $_
find ./ -type f -maxdepth 1 -exec sed -i '' -e 's/example-project/myapp/g' {} \;
cd ../..
vagrant up --provision
Utilize Gulp Starter as project builder:
svn checkout https://github.com/vigetlabs/gulp-starter/trunk/src src
svn checkout https://github.com/vigetlabs/gulp-starter/trunk/gulpfile.js gulpfile.js
svn export https://github.com/vigetlabs/gulp-starter/trunk/package.json
Add php.js
and twig.js
from older projects to gulpfile.js/tasks
. Edit name
, version
and description
in package.json
.
Clean unnecessary folders and .git
folder to start a fresh history:
rm -rf .git
rm -rf ./src/html ./src/images
rm -rf ./gulpfile.js/tasks/html.js ./gulpfile.js/tasks/images.js
npm install
Tell .gitignore
to ignore htdocs and VVV config files:
echo "htdocs/\nvvv-hosts\nvvv-init.sh\nvvv-nginx.conf\nwp-cli.yml" >> .gitignore # We can now ignore the destination folder after vagrant provision
git init
git add .
git commit -m 'Allons-y!'
Then use Tower app to initiate Git-Flow.
Create a new Github repo without .gitignore and README.md. Then add the new origin to our local repo:
git remote add origin https://github.com/USERNAME/REPOSITORYURL.git
Do a git push to make sure everything's good.
Prepare the bare repo for deployment using this prep.sh and post-receive hook:
ssh -i .ssh/KEYNAME user@host
cd ~
curl -O https://gist.githubusercontent.com/nikosolihin/7b4eabe087ccec339eca6d8e60d1c56f/raw/7e433ce5a235e1b150d2eeb2fec9c1f0d664b42a/prep.sh
chmod +x prep.sh && ./$_
- Head to Travis CI account settings, sync repo and toggle the project's repo.
- Copy the markdown of the status badge.
- Revise the project's README.md and paste the badge.
- Copy the private key that Travis will use to the folder. Don't commit!
- Run
travis login
andtravis encrypt-file deploy-key --add
to add the needed env vars and update.travis.yml
rm deploy-key
- Customize
.travis.yml
- Cut and paste the
openssl
part to_travis/install.sh
- Make sure
_travis/deploy.sh
looks good - If using Basecamp, update the Zapier webhooks URL in
.travis.yml