GitHub Pages Deployment
Travis CI can deploy your static files to GitHub Pages after a successful build.
You will need to provide a personal access
and set the deployment provider details in
For a minimal configuration, add the following to your
deploy: provider: pages skip_cleanup: true github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard on: branch: master
Make sure you have
skip_cleanupset to true, otherwise Travis CI will delete all the files created during the build, which will probably delete what you are trying to upload.
Setting the GitHub token
You’ll need to generate a personal access
repo scope (
repo is required for private
repositories). Since the token should be private,
you’ll want to pass it to Travis securely in your repository
or via encrypted variables in
local_dir: Directory to push to GitHub Pages, defaults to the current directory
repo: Repo slug, defaults to current repo
target_branch: Branch to push force to, defaults to
fqdn: Optional, sets a custom domain for your website, defaults to no custom domain support.
project_name: Defaults to value of
fqdnor repo slug, used for metadata
name: Optional, comitter, defaults to