Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

Commit

Permalink
auto deploy dist files to gh-pages/dist
Browse files Browse the repository at this point in the history
  • Loading branch information
adon committed Jul 16, 2015
1 parent a76c52b commit 915b8ac
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ coverage

# build
docs
dist
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ deploy:
condition: $VALID_VERSION = true
tags: true
branch: master
deploy_gh_pages:
env:
global:
- GH_REF: github.com/yahoo/secure-handlebars.git
- secure: IMKSQkQZnZVVtPKwzwt3n5RE4JUcHcY/ySKrQXCDA+Drzll6q31fJns+lN9xGfWMwWfv12+PXPvM+WU1o5IjuvfKOSxfLqy8xl1XxH3sJZuK4R1CI9SHToydJJu5V9zZeO40AvD+5G3Z5u6hOqrf2lbiaqq3zVz8DtEKxSg3OcE=
18 changes: 18 additions & 0 deletions bin/auto-push-gh-pages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
# Assumption: all files are readily built and located at dist/

git clone "https://${GH_REF}" -b gh-pages gh-pages

# copy all files from dist to gh-pages/dist
mkdir gh-pages/dist
cp dist/* gh-pages/dist/

# set username as gh-pages-robot
cd gh-pages
git config --local user.name "gh-pages-robot"
git config --local user.email "[email protected]"

git add dist/.
git commit -m "Deploy latest dist files to gh-pages"

git push --quiet "https://${GH_TOKEN}@${GH_REF}" > /dev/null 2>&1

0 comments on commit 915b8ac

Please sign in to comment.