First, download the required npm packages.
npm install
Then, run the appropriate command for your purposes.
npm run [start / build]
On every push to main, a new branch will be created using GitHub actions, containing source code needed for a GitHub Pages deployment. To finish the setup, do the following:
- Go to
Settings
in your repository. - Click
Pages
on the left menu. - Select the
gh-pages
branch from the dropdown. Leaveroot
as/
. - Your site will go live!
For additional configuration, you can add a custom domain and HTTPS support.
If you are looking for a full stack web application built on AWS and GitHub pages, see here.