Reputation: 117
I have a personal website which uses github pages to host and deploy, https://github.com/tonydavis629/personal-site. It was working fine until yesterday when it suddenly started hanging on the Build and Deploy stage of my deployment. It will hang for hours until it says it is cancelled. Here is the output of the failed stage on the Actions tab on github
2h 22m 54s
Run git config user.name "Automated"
> [email protected] predeploy
> npm run build && react-snap
> [email protected] build
> rimraf ./build && react-scripts build
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
Compiled successfully.
File sizes after gzip:
82.16 kB build/static/js/main.7749ae65.js
23.56 kB build/static/js/872.f763e0ca.chunk.js
7.79 kB build/static/css/main.d4403bfe.css
6.76 kB build/static/js/166.f005bd44.chunk.js
5.57 kB build/static/js/964.46c409e0.chunk.js
4.37 kB build/static/js/209.d464d894.chunk.js
4.23 kB build/static/js/161.6a13cc1c.chunk.js
3.12 kB build/static/js/596.ad0d1198.chunk.js
1.09 kB build/static/js/453.436ed330.chunk.js
765 B build/static/js/478.1cd2f26a.chunk.js
493 B build/static/js/562.4dc7da4b.chunk.js
400 B build/static/js/922.fefd4601.chunk.js
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
https://cra.link/deployment
Error: The operation was canceled.
I notice that something changed in the Deployments / History page where suddenly it was being deployed by Github Actions 'on behalf' of me, instead of by me. Here is a picture of what I mean.
Since the last successful deployment the only thing I changed was adding some text, it seems clear that whatever is messed up is within gh-pages and not a build failure or anything like that. I'm not sure what to do, can anyone help? Thanks.
Upvotes: 1
Views: 1218
Reputation: 1851
After struggling with a deployment that "hung" (it sat in the deploy phase for over an hour, I canceled it and restarted it to no avail, and then could not cancel it again...) the following worked for me:
Upvotes: 0
Reputation: 117
My issue was that github's latest ubuntu was updated to 22.04. I reset it manually to ubuntu-20.04 in my github-pages.yml workflow and it fixed the problem. I'm sure there is a better solution but this is working for me now.
Upvotes: 0