Publish to github pages with travis-ci

Good day,

I’m trying to build minimalistic wiki engine with middleman and github.

and leverage travis-ci.org to build from my ‘source’ branch to master branch after pull requests gets merged:
https://github.com/digitalnomads/digitalnomads.github.io/tree/source

It seems that travis just doesn’t push to master with my current configuration:
https://travis-ci.org/digitalnomads/digitalnomads.github.io/builds/56010550

here is my current configuration:

---
language: ruby
script: bundle exec middleman build

env:
  global:
    - GIT_COMMITTER_NAME=digitalnomads
    - GIT_COMMITTER_EMAIL=''
    - GIT_AUTHOR_NAME=digitalnomads
    - GIT_AUTHOR_EMAIL=''
    - secure: "byv67D/fUqjszVE2IuzLaku6IlClY1L6/ZPZRVZSvmm4YLHKornLOTBzMCPgOPCxL3wCc0y3L4FocpXaKAJ+TjesHs4aTQEPplTd0GpwTRDT+hVxwB7jzwuTSqsrBLTfJDR4AEMYn9fSRT+9+kNAINe9LnfHbGB2Tyr/vGAip7g"

before_script:
  - git clone --quiet https://github.com/digitalnomads/digitalnomads.github.io
  - git checkout source

after_success:
  - cd build
  - git add -A
  - git commit -m 'Update'
  - '[ "$TRAVIS_BRANCH" == "source" ] && [ $GH_TOKEN ] && git push --quiet https://$GH_TOKEN@github.com/digitalnomads/digitalnomads.github.io.git master 2> /dev/null'

Anyone had experience building static pages with travis-ci? and can share their .travis.yml?

Hi there,
I need to confirm the build process of travis. To be precise, Travis runs the build on Pull request by supposedly merging the feature branch code in the master branch and then when we click on the merge button, it merge the code in the master but I need to confirm that does travis runs a build after merging the pull request in the master branch?

Another query: I am storing my credentials in the environment variables in travis, and I want to run the integration tests which needs to access the credentials from the environment variables, what is the best way to do this with securing my credentials?

Please help me with these issues.