Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example .travis.yml file to deploy to GitHub Pages

Example .travis.yml file to deploy to a GitHub Pages branch

os: linux
language: ruby
cache: bundler
install: bundle install

branches:
  only:
    - release

notifications:
  email: false
  slack:
    on_success: always
    on_failure: always
    on_pull_requests: true
    secure: LWMZFRNa/MS8U6lukB6sWod9A8sVY+zsd6V7pC8Gos0no7pkbtApt88eeJU7InRuJ65Lo+rxjWH1T64PdTT+s8vFGoBB6NzJk+E0oxrsm05MvW3aUde6tsX75BCBqVWu5LmTu+M4QRmbiGaMOndBe1y5L3oai6jJzDGpsSiFAN1yFMOx3tbw1p/788DCKr9n4BMq1BqoCaIKLArxEcJ/vH62vyFHrPQQvBQpi24TSsplSASaaLMlLGF3rXQAzBvDY1UpOSiiuMpTuj82O+d2rtN2vqO06qcYQwEU8dycxW5ku+UJRyM6toQTQW6zcwM3Mx+vDWLsABAUwfZKENmUBTGqvGpXDRzvJYV1ZeZqCgDZl/VxI3G2nvWU4fsXdTKE9KJ7fUGqNwSIFilPUB3XVI3I1AP5mQ8Kp5oOoY8tO3xG4weS8PPdwHo3bEnoQeMTg4HHcPXAXcH414QLCctXpL2F8NGxNkCHX3tk6QE0ImjiJe5+7bE97QX2TSDJc1hK6zzUqfBSCUqcT/2dmZwpMWOMolLgy407rn24fKOglry7ZTXCkVSFNHEY+WvIKjvlL3VptFvWO0Q2MnNliHy/42ZUnLJACCbgd56gt8l0da2hdP6OQp2JNvhPOr7cijS3WFVzScMvFFo25DL8mjSMlMGZ2rTRC8Kr5/vM62Bf6G4=

script:
  - JEKYLL_ENV=production bundle exec jekyll build --destination ./site

after_success:
  - htmlproofer --assume-extension --allow-hash-href --internal-domains /emmasax4.info/ --url-ignore /linkedin/,/digikey/ ./site

deploy:
  provider: pages
  name: Deployment Bot
  email: deploy@travis-ci.org
  target_branch: master
  commit_message: Deploy to %{url}:%{target_branch}
  local_dir: ./site
  keep_history: true
  edge: true
  on:
    branch: release
  token:
    secure: cRnLkJQhgHWUqw9Cjoq6C5oyh2gjrM8yWnYpzRBhqhCtLBBkwdPduBEfIkvGkUcPz26sEsLnnpSUZrg56cS47APbYV3qePqpHKskRovbQWo7SeokBTetGuOUfEyrJ3G2+dHM+uZSzUV0wstl+6TsUnh+GdkjAiVaiISo3gScPNgK9qKbGEC+zeLJ0N5LEZfbmOJt3JJXp6Ke9oNBr1e/nqFSsjZBlOIxZ0VVKGB/4EFOON5AUmOnB6XxuM/59DOwiTatCX2JoxUP4PuuqQE7we2/PZ3ydYMHpPBFAZxUTDmNXvvNYuR1ErzGmTSsKGuoRX5l20xMnqKOnribukYy1K7qYKa544h73fTYJDorG4qISKV0MDRaBjhD0w3lxEIBJkFmWQaJ8gZ6wJ5xAl+s+v/d0AKIXJEyZ4Tk635WTeh8DqshpJEVR85bmo/2l56xRVLyjAa2hLaEyk9yH/0DzOwEJF910oX7c+UJWWyFaTFDaZF62gzm1rFUSO0nv5pOfWedNapNGlgQQVjfnI4aa1BVKvK4enhgNsBEWTOcIPNhKBtaFRbMXlWnUntm9EdOX8b5JH5qWPhiqq2+cmV0X0//t5F+i7YJ2HwbO/Xb6Z/1JTGBoB0iDf0NAkwp1LJ1PMC6DmRyIf9TEZiOUhgLSg7nrlU3F6pvAJHF2IUi+hE=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment