This article explains the basics of using AppHarbor. In this article, I’ll use the .NET SDK Samples project to show how to deploy a .NET project on AppHarbor.
- .NET project
- App account
First of all, we need a AppHarbor account. If you don’t have one yet, please create one. Registration on AppHarbor is similar to any other site: sign up from the AppHarbor home page by clicking the Sign up button.
Ok now we have AppHarbor account and we are ready to deploy.
- Clone the GroupDocs GitHub repository containing the .NET SDK.
- Create an empty folder anywhere on your local machine. Name it groupdocs-dotnet-samples.
- Go to the folder with the cloned repository and then to the examples folder. Here you can see some folders, one of them will be api-samples.
- Copy the content of the api-samplesfolder.
- Post the copied content to the empty folder created in step 2.
Preparation is complete. If you can’t wait and want to see the example working, you can go straight to GroupDocs .NET API Samples and see our samples at work.
Deploy to AppHarbor
- Login to AppHarbor. and go to Your Applications.
- Create a new application:
- Enter an application name.
- Choose United States or Europe.
- Click Create new.
- Open a console and cd to the folder that the project was copied to. It’s a groupdocs-dotnet-samples folder.
- Enter the command git init
- Then enter the command git add . (This adds all files.)
- Enter the command git commit -m "Initial commit"
- Go to Your Applicationsin AppHarbor and click on you application.
- Copy the URL of your application.
- Return to the console and, as a final step, enter the command git push [URL of the api you copied] master.
Running a Project on AppHarbour
After these steps, our local project is deployed on AppHarbor. Lets go to AppHarbor and run the project.
In Applications, we see the build status of the current commit. If it is Active, there is a link to run it.
That’s all, as easy as a piece of cake.