I’ve resolved the issue. I noticed that the deployment for the main branch kept getting stuck, even after multiple attempts to rerun all jobs. Since I couldn’t view what was happening in the backend, I tried deploying a gh-pages branch instead.
Here’s what I did:
- Set up the gh-pages npm package to automate deploying only the build files to a gh-pages branch.
- Updated my package.json with a "deploy" script:
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}
- Now, each time I want to update the live site, I just run npm run deploy. This process ensures that the gh-pages branch is kept in sync with the latest build, and GitHub Pages correctly reflects my updates now.