You'll need to use a subdirectory within your git repo for the Meteor project. This allows you to clone Meteor into your repo without it trying to deploy itself. If you find a better way, please let me know.
Provide the name of the subdirectory to the deploy script with the SUBDIRECTORY
environment variable.
You can do that here. Connect it to your GitHub repo.
Add these variables in the "Environment" section:
SUBDIRECTORY = yourapp [see project structure above]
METEOR_USERNAME = ...
METEOR_PASSWORD = ...
METEOR_TARGET = yourapp.meteor.com [or www.yourapp.com]
Under the "Deployment" section, add this script:
expect -c "set timeout 600; spawn git clone -b release/$(cat $SUBDIRECTORY/.meteor/release) https://github.com/meteor/meteor.git --depth 1; expect eof; spawn meteor/meteor login; expect Username:; send $METEOR_USERNAME; expect Password:; send $METEOR_PASSWORD; expect eof; cd $SUBDIRECTORY; spawn ../meteor/meteor deploy $METEOR_TARGET; expect eof }"
You should NOT include newlines, but here it is expanded:
# DON'T INCLUDE NEWLINES, USE THE VERSION ABOVE!
expect -c "
set timeout 600;
spawn git clone \
-b release/$(cat $SUBDIRECTORY/.meteor/release) \
https://github.com/meteor/meteor.git \
--depth 1;
expect eof;
spawn meteor/meteor login;
expect Username:;
send $METEOR_USERNAME;
expect Password:;
send $METEOR_PASSWORD;
expect eof;
cd $SUBDIRECTORY;
spawn ../meteor/meteor deploy $METEOR_TARGET;
expect eof
}"
Push changes to your GitHub repo, and Codeship will deploy them automatically with Meteor!
Thanks for the gist. Is this still current?