Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.21 KB

deploy.md

File metadata and controls

40 lines (25 loc) · 1.21 KB

Deploy

Build

Do a production build of the the React app, either locally or as part of a CI/CI flow as below.

  • Yarn
    $ yarn build
  • NPM
    $ npm run build

Note that the homepage value is read from package.json and React sets NODE_ENV='production' for you.

CI GitHub Actions

This project is setup to automatically build and deploy to the gh-pages branch on Github. That branch is used to run the GitHub Pages site, managed in repo settings.

Do a push to main or merge a Pull Request against main to trigger the CI/CD build.

The build and test steps will always run, for quality control, but the app will only deploy on changes to main.

See the workflow file to manage this.

Configure GH Pages

After a successful build, you can configure your site to be served on GitHub Pages as follows:

  1. Go to repo Settings.
  2. Go to GitHub Pages section.
  3. Enable the site on gh-pages branch the root directory.
  4. Wait for your site to build.
  5. Check the Actions tab on the repo for the status of the build.
  6. Open the public URL when it is done. e.g. https://MichaelCurrin.github.io/react-quickstart