Skip to content

Instantly share code, notes, and snippets.

@simenbrekken
Last active January 25, 2016 22:17
Show Gist options
  • Save simenbrekken/f4445cedff73dc632f56 to your computer and use it in GitHub Desktop.
Save simenbrekken/f4445cedff73dc632f56 to your computer and use it in GitHub Desktop.
Codeship Azure Website Custom Deployment Script
# $AZURE_REPO_URL needs to be set in your projects Variables section
# and include both username and password, e.g: https://username:[email protected]:443/site.git
# Clone Azure repository
git clone $AZURE_REPO_URL ~/azure
cd ~/azure
# Replace repository contents
rsync --archive --delete --exclude ".*" ~/clone/public/ .
# Commit changes
git add --all
git commit --all --author "$CI_COMMITTER_NAME <$CI_COMMITTER_EMAIL>" --message "$CI_MESSAGE ($CI_BUILD_URL)"
# Push changes to Azure
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment