actions / deploy-pages

GitHub Action to publish artifacts to GitHub Pages for deployments
https://pages.github.com
MIT License
602 stars 77 forks source link

GitHub Enterprise Server 3.11.5 compatibility #317

Open brookman opened 5 months ago

brookman commented 5 months ago

As of late we are getting this error with GitHub Enterprise Server:

Run actions/deploy-pages@v3
Artifact exchange URL: https://XXX/_services/pipelines/N9xhoXOaQkwWLka4yOLfdfR2C0RRPkrQNLI8joO5jYtVMBmgRu/_apis/pipelines/workflows/708392/artifacts?api-version=6.0-preview
Creating Pages deployment with payload:
{
    "artifact_url": "XXX/_services/pipelines/N9xhoXOaQkwWLka4yOLfdfR2C0RRPkrQNLI8joO5jYtVMBmgRu/_apis/pipelines/1/runs/97/artifacts?artifactName=github-pages&%24expand=SignedContent",
    "pages_build_version": "63c2c2cda058d5b52de2de2[13](https://XXX/XXX/XXX/actions/runs/708392/job/1168886#step:2:14)3994b4ddfee97aa",
    "oidc_token": "***"
}
Created deployment for 63c2c2cda058d5b52de2de2133994b4ddfee97aa, ID: 63c2c2cda058d5b52de2de2133994b4ddfee97aa
Getting Pages deployment status...
Error: Deployment failed, try again later.

I believe it might happen since GitHub Enterprise Server has been updated to version 3.11.5. Tried it with deploy-pages@v3 and v3.0.1 (also v4 just in case). Tested GitHub Runner version: 2.311.0 and 2.313.0

AdrianAntunez commented 5 months ago

This issue suddenly started also to us, we're running GHES 3.10.7... @brookman have you found any fix or workaround?

brookman commented 5 months ago

Unfortunately not. Except manual deployment using a "pages" branch.

yoannchaudet commented 5 months ago

We have left a bug slip in the hot patch logic of GHES – 3.11.5 is one of the patch impacted (and not the only one). Documentation is on the way and support is already aware and can assist you if you prefer.

The workaround is to run the following commands on all your Pages fileservers:

if [ -d "$CHROOT_PATH/data/pages-untar" ] ; then
  rm -rf "$CHROOT_PATH/data/pages-untar"
fi
pages_untar_image_tag="$(cat "$CHROOT_PATH/data/docker-image-tags/pages_untar_image_tag")"
id="$(docker create "pages-untar:$pages_untar_image_tag")"
sudo docker cp "$id:/data/pages-untar" "$BASE_PATH/$CHROOT_PATH/data/pages-untar/"
docker rm "$id"

This won't cause downtime, need a restart or reboot of anything. It impacts only Pages builds that run within Actions (e.g. with a custom workflow like you are doing here).

AdrianAntunez commented 4 months ago

@yoannchaudet thx for sharing this. We've contacted GHES support and we've applied the fix. It worked :) If you have any official issue for this bug, I would appreciate to follow it to know when this is officially fixed. Thx once again :)

tyrken commented 4 months ago

@yoannchaudet has this fix made it to any published GHES version yet (I can't see anything like it in the release notes)?

FWIW we're seeing it in v3.10.7 that came out at the same time as 3.11.5...

Edit: I now realise I can see this issue at the end of "Known Issues" for 3.10.8 and 3.11.6 - but it's not in the list for 3.12.0. Does this mean it's fixed in 3.12.0+?

yoannchaudet commented 4 months ago

👋