gitname / react-gh-pages

Deploying a React App (created using create-react-app) to GitHub Pages
6.47k stars 913 forks source link

Update README.md to add instructions for how to add workflow to automate deployment on pushes to master branch #198

Open caitlynrawlings opened 1 month ago

caitlynrawlings commented 1 month ago

I added an optional step 10 in the README.md that describes how to set up a GitHub workflow to automate the deployment process. This workflow triggers the npm run deploy command to update the gh-pages branch whenever changes are pushed to the master branch, ensuring the deployed website on GitHub Pages is always up to date.

I initially wrote this workflow for personal use to avoid manual update of GitHub pages. I believe it will be helpful for others who want their changes on the main branch to be automatically reflected on GitHub Pages without additional steps.