A React Application on Github Pages with Travis CI

Chad Mowbray
6 min readNov 1, 2020

Host a React app on Github pages using Travis CI for continuous integration

Continuous Integration and Continuous Delivery (CI/CD) are quickly becoming industry standards in software development. Today we are going to focus on the first term: Continuous Integration. Continuous Integration basically means setting up “pipelines” to thoroughly test a codebase every time a change is made.

  1. You as a developer make some small change to the codebase and submit a PR.
  2. Some system (we will be using Travis CI) detects the change.
  3. The code (with your changes) is then built from scratch in a new environment — almost certainly containerized.
  4. If nothing blows up, some initial tests are run (unit tests, linters, etc.)
  5. If nothing fails, the changes will undergo further tests with more of the codebase (integration testing).

A given pipeline can be more or less complex depending on a variety of factors. But the important part is that the process is automated. This makes the process of changing code transparent and consistent for everyone. It also makes it more difficult for bugs to creep in and stay hidden.

When working on a project — especially in a group — this can be a very handy process to have set up. Every time someone pushes up a PR, the project is built from scratch using the same versions of all the packages, operating systems, etc. If you set up your testing…

--

--