# Deploy a react app

# Prerequisites

Before starting the tutorial, please do the following:

In this guide we'll deploy a react app with Digger

# Set up

First we need a react app. We used create-react-app to generate a standard app quickly.

image

Make sure your app is in a GitHub repo - like ours (opens new window)

Go to Digger.dev (opens new window) and login via GitHub

https://digger.dev/ (opens new window)

Click Add Project (Your Own Account)

image

Select from your repos.

image

Note: you may need to connect repository first. You can press refresh list if it doesn’t display immediately.

image

Digger works some magic

image

Type is automatically bypassed in this case because Digger detected it’s a SPA

Put the name of your app - this is just for Digger

image

Now add your AWS credentials.

For how to get your AWS secret & key, go here (opens new window)

image

I’m in London so I selected eu-west-2

image

Hopefully you should see something like this:

image

Yay!

image

Within my project to see my app deployed, I can click on Environments and details

image

I can see the app deployed at public URL

image

https://amazidd744-amazid679e-amazi16cdf.dggr.app/ (opens new window)

# Build issues?

One of the most common issues is that your branch is main instead of master.

To fix this, go to Environments and click on Details

image

Edit

image

Then change the CI branch

image

Now go back to Services and press deploy

image

Then if it works, you can go back into Environments (as described above) to get your URL.