Collection documentation using GitHub Actions: changes to how GH pages can be published

GitHub recently announced that the method that is described in ansible-community/github-docs-build wiki on Getting started with GitHub Pages · ansible-community/github-docs-build Wiki · GitHub no longer works.

If you are using the workflows (usually you will have .github/workflows/docs-*.yml for that in your repository) to publish the docs to GitHub pages, you can switch to the new publishing system as follows:

  1. Go to the repo’s settings, the GitHub Pages tab, and change “Build and deployment”'s “Source” from “Deploy from a branch” to “GitHub Actions”.

    New value:

  2. (THIS STEP HAS BEEN UPDATED!) Create a commit similar to ansible-collections/community.sops@03d53d08942161491df294ad68bf275abacc5363 in the main branch (and backport it to every active stable-x branch that contains the docs-pr.yml and docs-push.yml workflows as well!).

That’s it :slight_smile:

Note that the old way will stop working on June 30th, so please don’t forget about this!


EDIT: The above have been updated (see the third post in this thread) and now works.

Hmm, it looks like this doesn’t fully fix the problem, since when a workflow pushes to the gh-pages branch, this will not trigger the workflow that reacts to gh-pages pushes (so it can publish the pages). The discussion on this will happen in The instructions on using GitHub Pages to publish docs are outdated and will stop working on June 30th · Issue #92 · ansible-community/github-docs-build · GitHub, I’ll write here again when we find a working solution.

Ok, there is a working fix now, that requires you to update the docs-pr.yml and docs-push.yml workflows. Check out Adjust docs publishing workflow. (#189) · ansible-collections/community.sops@03d53d0 · GitHub to see what exactly you have to change!