Automate GitHub Pages with Travis CI

To have a CICD pipeline for my github pages site, i use the following travis config. GITHUB_AUTH_SECRET is set in the settings page of the respective travis project.

 1---
 2install:
 3  - curl -LO https://github.com/gohugoio/hugo/releases/download/v${HUGO_RELEASE}/hugo_extended_${HUGO_RELEASE}_Linux-64bit.deb
 4  - sudo dpkg -i hugo*.deb
 5
 6script:
 7  - hugo
 8
 9deploy:
10  - provider: pages
11    local_dir: public
12    repo: richardstrnad/richardstrnad.github.io
13    target_branch: master
14    skip_cleanup: true
15    github_token: $GITHUB_AUTH_SECRET
16    keep_history: true
17    on:
18      branch: master
19
20env:
21  global:
22    - HUGO_RELEASE=0.79.1
comments powered by Disqus

Subscribe to our Newsletter

We will inform you of new posts!

* indicates required
The Latest