Since introducing the GitHub integration thousands of AppHarbor users have configured their applications to automatically deploy code from GitHub repositories. Setting up the service hook to get AppHarbor to deploy from GitHub was never very intuitive though: It required navigating to the service hook section on GitHub and copy-pasting values retrieved from the AppHarbor application build-url.
We've now greatly improved on that workflow by leveraging the AppHarbor and GitHub API's to automate the process. Now, when you create a new application and click the "Configure GitHub to deploy to AppHarbor" link, we'll redirect to a utility-app that will log you in to GitHub and let you select which of your GitHub repositories to add the AppHarbor service hook to. We'll also add the
apphb user as a collaborator on GitHub to let us pull the code if it's private.
The utility-bridge app accomplishes it's magic using NGitHub and the AppHarbor SDK. Once we've cleaned up the code, we expect to open source it for use as sample code to illustrate how to use these API's.
Remember that you can add multiple application slugs to the GitHub service (the
token is user specific and shared between applications) . The automatic setup doesn't currently support multiple slugs, it'll wipe existing slugs if the service is already configured for a GitHub repository, but we're working on improvements.
The new flow is illustrated below:
- Create a new AppHarbor application
- Click the "Configure GitHub to deploy to AppHarbor" link
- You'll be redirected to the utility app and required to log onto GitHub if you're not already signed in
- Once redirected back to the utility app, select the repository you want to deploy from
- You'll be redirected back to AppHarbor and should see the application being built