Use Git and a .deployment File to Deploy an Orchard CMS Precomplied Build to a Windows Azure Website
Note: while this works, it isn't a best practice for continuous delivery, because it adds build results to the repository.
- Clone the Orchard Source into SomeDirectory.
- Add a .deployment file to SomeDirectory (from powershell,
ni – t file –n .deployment
) - SomeDirectory will now contain:
.git .deployment lib src .gitignore build.cmd ClickToBuild.cmd ClickToBuildAzurePackage.cmd CREDITS.txt DeleteModuleBinaries.cmd LICENSE.txt Orchard.proj
- Open a Developer Command prompt at SomeDirectory. Run
build precompiled
. It’ll add these two new folders to SomeDirectory.build buildtasks
- Open your .deployment file. Add the following
[config] project = build/precompiled
- Note: If you have a .gitignore file that ignores the build/ directory, you must ask git to force add everything from the precompiled folder (except App_Data and Media, because they will contain live stuff that we add from the Orchard UI)
git add -f bin/* git add -f Config/* git add -f Core/* git add -f Modules/* git add -f Themes/* git add -f CREDITS.txt git add -f Global.asax git add -f LICENSE.txt git add -f Refresh.html git add -f Web.config (Yes. Git is case sensitive).
- Finally, create a new Windows Azure website with deployment from version control > GitHub > etc.
- If you’ve followed the steps above, and check out your Azure Website through FTP, you should see the following:
- This is what it will look like online:
Resources
https://github.com/projectkudu/kudu/wiki/Customizing-deployments (.deployment)
http://msdn.microsoft.com/en-us/library/ms229859%28v=vs.110%29.aspx (Developer Command Prompt)