Remove usage of peaceiris/actions-gh-pages action#110
Conversation
Seems to work as expected. |
briantist
left a comment
There was a problem hiding this comment.
I think this looks good to me for moving away from this action.
I mistakenly thought we were using force_orphan=true to keep commit bloat down but I forgot that it does not work with keep_files=true.
It might be nice to implement that ourselves later.
Essentially, that option pushes every commit as the first commit of the branch, rewriting its history, which helps to keep the size down, but it sounds tricky to implement when a given workflow is meant to be acting on a single branch/pr/commit but also has to include all the rest of the repo contents to do that correctly, maybe not worth the effort.
Thanks for your work on this as always @felixfontein
That sounds like a great idea, but I don't think it should be enabled by default. I guess we could make it a configuration option. (In any case, I think this would be best as a follow-up, for later.) |
In theory, with the "new" (2+ year old) purely actions-based workflow for GH pages, we should be able to completely avoid having a branch and committing contents at all, but that process is missing features that would support what we're doing here, and the team has declined to implement any of them, see:
This is a possible workaround by using the cache as a replacement for not being able to download the site artifact: |
|
Being able to download the current page would definitely be great... One of the reasons why I didn't introduce this action for example to community.general is because I'm scared the Using caches for this is very dangerous: caches are ephemeral and can be deleted at any point in time (because the user expliictly tells GitHub to do so without realizing what it means for the pages build, or because GitHub decides it wants to save some disk space). Using them for mission-critical data is a bad idea. |
|
@briantist thanks for reviewing! |
(The branch no longer exists, as it has been merged.) This reverts commit c291728.
|
My CI is failing now: https://github.com/ansible-collections/community.hashi_vault/actions/runs/25253040128/job/74048023586 It's the delete that fails but that seems to be caused by the Also we were using the github action for Sorry I should have caught these earlier in review @felixfontein |
|
I'll create a PR to fix this.
That does work (I tested that), since |
Since the https://github.com/peaceiris/actions-gh-pages action isn't really actively maintained anymore (many Dependabot PRs open for many months already, still using Node 20 despite issue and PR to fix it available for > 1 month), and wasn't that actively maintained in the past either, I looked into whether we could replace it by some tasks.
Since right now it's basically only used to modify the
gh-pagesbranch by adding/replacing/removing directories (with all their content), I think this should be possible.I'd like to test this a bit before merging, so I'm marking this as a draft for now.