Skip to content

Instantly share code, notes, and snippets.

@chrisnharvey
Created July 8, 2014 19:49
Show Gist options
  • Save chrisnharvey/9e12020141578e37bd18 to your computer and use it in GitHub Desktop.
Save chrisnharvey/9e12020141578e37bd18 to your computer and use it in GitHub Desktop.
Sculpin deploy script
#!/bin/bash
if [ "${VARIABLE}" = "1" ]; then
echo "This is a pull request, nothing to deploy"
exit
fi
echo skulpin-test.chrisnharvey.com > ./output_prod/CNAME
cd ./output_prod
git init
echo "https://${GH_TOKEN}:@github.com" > .git/credentials
git config user.email "${GIT_EMAIL}"
git config user.name "${GIT_NAME}"
git config credential.helper "store --file=.git/credentials"
git remote add origin https://github.com/chrisnharvey/skulpin-test.git
git add -A
git commit -m "Deploy"
git push --force origin HEAD:gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment