From b3c18f62032c65126c8f4368e23c2548a5ee596d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Wed, 23 Sep 2026 19:55:11 +0200 Subject: [PATCH] Add a manual trigger to the documentation workflow The published documentation is rebuilt on a push here or on a repository_dispatch sent by opm-common or opm-simulators when their docstring files change. When such a dispatch fails there is no way to re-run the build short of sending the dispatch by hand through the API or pushing a commit. That happened after OPM/opm-simulators#7439 was merged: the dispatch was rejected with 401 "Bad credentials" because the token opm-simulators sends it with is no longer valid, and the documentation was only republished once the dispatch was sent manually with other credentials. OPM/opm-simulators#7443 makes that failure visible; this adds the way to recover from it. workflow_dispatch adds a "Run workflow" button to the Actions tab. The existing conditions already give it sensible behavior: run on master, github.ref is refs/heads/master and the gh-pages deploy step runs; run on any other branch it builds only, since the per-branch deploy step requires a push event. The branch list passed to sphinx-versioned falls back to github.ref_name, which is the selected branch. --- .github/workflows/python_sphinx_docs.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/python_sphinx_docs.yml b/.github/workflows/python_sphinx_docs.yml index 306e82b..d54da15 100644 --- a/.github/workflows/python_sphinx_docs.yml +++ b/.github/workflows/python_sphinx_docs.yml @@ -15,6 +15,11 @@ on: branches: [master] repository_dispatch: types: [docstrings_common_updated, docstrings_simulators_updated] + # Manual trigger ("Run workflow" in the Actions tab). Use it to rebuild and republish + # after a dispatch from opm-common or opm-simulators failed, e.g. because the token + # those repositories send it with has expired. Run on master it deploys to gh-pages; + # run on any other branch it only builds. + workflow_dispatch: permissions: contents: write jobs: