docs icon indicating copy to clipboard operation
docs copied to clipboard

Deploying to GitHub Pages is problematic/flakey

Open dgilleland opened this issue 1 year ago • 1 comments

📚 Subject area/topic

Deployment

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/guides/deploy/github/

📋 Description of content that is out-of-date or incorrect

The problem probably lies with the recommended action withastro/action@v2. Still, I am reporting it here as I am uncertain of the maintenance/issue response time in withastro/action.

The action appears to be "flakey". At least, I've found it so over the past couple of weeks, and various attempts at "adjusting" it according to the instructions have had mixed results. This is true on multiple sites that are running Astro and hosted on GitHub pages.

I'm concerned whether the action's internal dependencies are out of date; I think it's an effect of other "down-chain" dependencies in that action, so it maybe just needs more version bumps. I do notice a number of unaddressed PRs in that repo.

In any case, I keep getting:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Of course, the pnpm/action-setup@v2 isn't in the YAML offered in your docs, but it seems to be getting triggered in the bowels of withastro/action@v2

Here is a sample of the output from the action running on my own blog. If you check my action history, it was working fine for a while but then started getting problems even though my deploy hadn't changed. I attempted "fixes", but once I thought it was stable, it broke on the next post.

Run withastro/action@v2
Run len=`echo $INPUT_PM | wc -c`
Run pnpm/action-setup@v2
Running self-installer...
Installation Completed!
Run actions/setup-node@v4
Found in cache @ /opt/hostedtoolcache/node/20.12.2/x[6](https://github.com/dgilleland/dgilleland.github.io/actions/runs/9035996590/job/24831915231#step:3:7)4
Environment details
/home/runner/setup-pnpm/node_modules/.bin/pnpm store path --silent
/home/runner/setup-pnpm/node_modules/.bin/store/v3
pnpm cache is not found
Run $PACKAGE_MANAGER install
 ERR_PNPM_BAD_PM_VERSION  This project is configured to use v9.0.6 of pnpm. Your current pnpm is v9.1.0

If you want to bypass this version check, you can set the "package-manager-strict" configuration to "false" or set the "COREPACK_ENABLE_STRICT" environment variable to "0"
Error: Process completed with exit code 1.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

Not reproducible in StackBlitz because it is a deployment issue for the GitHub and GitHub Actions environment.

dgilleland avatar May 10 '24 18:05 dgilleland