Our GitHub actions for building our Documenter docs recently started misbehaving. One issue is that when I manually run out GitHub Documentation action, it doesn’t update the “dev” version of our docs.
Here is the error message I see:
┌ Info: Deployment criteria for deploying devbranch build from GitHub Actions:
│ - ✔ ENV["GITHUB_REPOSITORY"]="ITensor/ITensors.jl" occurs in repo="github.com/ITensor/ITensors.jl.git"
│ - ✘ ENV["GITHUB_EVENT_NAME"]="workflow_dispatch" is "push"
│ - ✔ ENV["GITHUB_REF"] matches devbranch="main"
│ - ✔ ENV["GITHUB_ACTOR"] exists and is non-empty
│ - ✔ ENV["DOCUMENTER_KEY"] exists and is non-empty
└ Deploying: ✘
Apparently the problem is a mismatch between the actual and expected value of the ENV["GITHUB_EVENT_NAME"] environment variable.
However, I’m having trouble figuring out:
what do actually do to change this environment variable?
if I change it to “push”, will that break other ways that this action gets run (e.g. manually running it versus it running as part of our continuous integration on PR’s)?
Following up on this, does Documenter.jl simply not support deploying a devbranch build for the case of a “workflow_dispatch” action (i.e. one initiated manually)? I’m still working to understand what our options might be here.
Our setup does work and build the docs when the action is “push”. It is, however, having some issues when the action is “pull_request” unfortunately.
Documenter predates workflow_dispatch, so yeah, deploydocs just doesn’t know what do with it. But I think we should support it, although I am not sure whether it should be exactly equivalent to push or not.
It should be completely fine if you do something like
if get(ENV, "GITHUB_EVENT_NAME", nothing) == "workflow_dispatch"
ENV["GITHUB_EVENT_NAME"] = "push"