How do I automatically build and deploy a react app to a Digital Ocean using GitHub actions

Posted October 1, 2020 5.3k views

I’ve built a basic React project based off create-react-app and have pushed it to GitHub.

I’d like to use GitHub actions to automatically build and then deploy to a Digital Ocean droplet each time I push a change to GitHub.

I can’t find a template on GitHub Actions to do this. And cant find a tutorial or blog that explains how to do this.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers
by Joe Morgan
DigitalOcean's App Platform is a Platform as a Service (PaaS) product that lets you configure and deploy applications from a source repository. This can be a quick and efficient way to deploy your React applications, and if you are using React to build a site with no backend, you can use App Platform's free tier. In this tutorial, you will create a React app with Create React App, push it to GitHub, then deploy it to App Platform for a quick continuous deployment option.