nexusformat / definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
26 stars 56 forks source link

Deploy by running CI manually #1201

Closed woutdenolf closed 1 year ago

woutdenolf commented 1 year ago

Closes

After this MR

  1. the CI runs without deployment for every pull request to the main branch and push (tags or commits) to the master branch
  2. the CI can only run with deployment when triggered manually, with "Deploy documentation" enabled, similar to this.
prjemian commented 1 year ago

@woutdenolf - The workflow completes now with no errors. This will resolve the problem I had with #1200 (where the matrix build created contention with writing the gh-pages branch from the different jobs). What work remains to change this from draft status?

woutdenolf commented 1 year ago

What work remains to change this from draft status?

I was trying to test manual triggering but I think we need to merge it before we can actually test it.

prjemian commented 1 year ago

Change it from draft and I will review.

prjemian commented 1 year ago

Note that manual run 187 was successful because it did not try to push the new gh-pages branch from each of the jobs at the same time.

woutdenolf commented 1 year ago

Yes but normally you should see something like this when triggering the workflow manually

image

Instead of "Fail the job?" we should have "Deploy documentation".

woutdenolf commented 1 year ago

Ah, now we do

image

prjemian commented 1 year ago

Publish documentation only runs from the py3.7 job, not the others, right?

woutdenolf commented 1 year ago

Ok I can confirm it works. I triggered the workflow with "Deploy decomentation" enabled and you see that the "Deploy information" step is executed, which means deployment will happen at the end. I cancelled the workflow as I'm not sure we actually want to deploy or not.

https://github.com/nexusformat/definitions/actions/runs/3097668463/jobs/5014607903

woutdenolf commented 1 year ago

Publish documentation only runs from the py3.7 job, not the others, right?

Yes

if: ${{ github.event.inputs.deploy && env.python_version == '3.7' }}
prjemian commented 1 year ago

Also, related to #1021, I wonder if we can create an additional variable and modify the workflow to publish a different version of the manual to a different location? Possibly a subdirectory of gh-pages?

prjemian commented 1 year ago

@woutdenolf - Thanks! @rayosborn - Now I believe we can push the latest documentation. I'll do this next.

prjemian commented 1 year ago

Success! See the new tabbed examples.