A simple guide to hosting your single page application.

Introduction

I recently created a website using the  Create React App starter template to demonstrate an npm package I developed. I thought it would be pretty straightforward to deploy this site using GitHub Pages, however, I was wrong. After some trial and error, I managed to sort it out. This article aims at recreating the scenario and walking you through the process of solving each problem we encounter along the way.

#1 Starting point

Let’s start with a common base. We’ll begin by creating a React app using the Create React App utility and also add the code to a GitHub repository. I’ve used the following command to generate this sample React app.

npx create-react-app <project directory> --template typescript

#github-actions #typescript #react #create-react-app #github-pages

Deploying a React App Using GitHub Pages and GitHub Actions
1.55 GEEK