mesonbuild / meson-python

Meson PEP 517 Python build backend
https://mesonbuild.com/meson-python/
MIT License
118 stars 59 forks source link

CI: fix docs build and deploy workflow #618

Closed dnicolodi closed 2 months ago

dnicolodi commented 2 months ago

Did I ever complain about the GitHub Actions documentation being an horrible mess?

dnicolodi commented 2 months ago

No, I haven't tested this locally and I run out of time for the moment. I was hoping that someone with more experience with GitHub Actions could comment on the validity of what I've done here. I'll test this in my fork. Anyhow, for some reason the GitHub Actions runners haven't pick up this PR...

rgommers commented 2 months ago

Ah okay. Let me compare with what works in another project. I have a fair amount of experience with GHA, but this kind of thing is mostly trial-and-error rather than understand-then-do unfortunately.

The updated docs are up on https://mesonbuild.com/meson-python/, so this isn't a burning issue I think.

agriyakhetarpal commented 2 months ago

Hi, I just looked at the changes made here, and I think they should work. 👍 Just to note that github.ref on tags is heads/refs/<name of the tag> and not just <name of the tag>, so that could be the only possible place where this can break.

dnicolodi commented 2 months ago

The updated docs are up

I triggered the workflow manually to publish them. I was not sure whether the issue was with the trigger or with the job definition, so doing that ruled out the latter.

dnicolodi commented 2 months ago

I've testes this and it works as expected. It needs an adjustment to the environment protection rules in the project settings to be able to deploy the documentation from a tag. I've already done this.