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.
Requirements
.NET project
App account
GitHub
Preparing
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.
Copying content from the api-samples folder
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.
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"
The result of steps 3, 4, 5 and 6 in the console
Go to Your Applicationsin AppHarbor and click on you application.
Application panel
Copy the URL of your application.
Button for copying URL
Return to the console and, as a final step, enter the command git push [URL of the api you copied] master.
Deploying to AppHarbor
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.