Netlify

Easy 5-Step Deployment Process

Step 1: Create a netlify.toml file in the root directory of your project and copy this code below. Edit these settings if you did not follow the boilerplate structure. More settings available here (https://docs.netlify.com/configure-builds/file-based-configuration/#sample-file)

[build]
  # Directory to change to before starting a build.
  # This is where we will look for package.json/.nvmrc/etc.
  base = "/"

  # Directory (relative to root of your repo) that contains the deploy-ready
  # HTML files and assets generated by the build. If a base directory has
  # been specified, include it in the publish directory path.
  publish = "./build"

  # Default build command.
  command = "yarn run build"

# The following redirect is intended for use with most SPAs that handle routing internally.
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Step 2: Commit your code and push your latest updates to a GitHub repository.

Step 3: Register or Login in at Netlify.

Step 4: In your account | team page click New site from git then chose your repository.

Step 5: Click deploy.

Note: No need to change any setting in the last step as netlify.toml overwrites these settings.

Now your code will be deployed automatically to Netlify on every push to the default branch of your repository.🥳🥳

Last updated