neuroinformatics-unit / HowTo

NIU website on common software problems and their troubleshooting
http://howto.neuroinformatics.dev/
Creative Commons Attribution 4.0 International
9 stars 1 forks source link

Different deployment target for test and production #8

Open lauraporta opened 1 year ago

lauraporta commented 1 year ago

Development branches could point to github pages domain (test), and the deploy that comes after merging into main (production) should point to troubleshooting.neuroinformatics.dev This could be done by reading an environmental variable in in the github actions that triggers the creation of the CNAME file.

adamltyson commented 1 year ago

Is this possible with GitHub actions? I kinda assumed we could only deploy to one place per repo.

Another option is to see if we can do something similar to the CZI napari plugin preview action and build the docs to deploy somewhere else during a PR.

adamltyson commented 1 year ago

@neuroinformatics-unit/website-team does anyone know if we can do something like this with the technologies we're currently using? It would be pretty useful.

niksirbi commented 1 year ago

I think, maybe yes?

Is Sphinx's conf.py we have:

# Redirect the webpage to another URL
# Sphinx will create the appropriate CNAME file in the build directory
# https://www.sphinx-doc.org/en/master/usage/extensions/githubpages.html
html_baseurl = 'https://howto.neuroinformatics.dev/'

If we can change this variable or the CNAME file it produces during the website building workflow, it should do the trick. But I may be misunderstanding something fundamental on how websites are deployed.

The other way is to have version-switcher dropdowns, as per this PyData Sphinx Theme guide. If we manage this, we could add a "dev" version in the switcher.

adamltyson commented 1 year ago

The other way is to have version-switcher dropdowns, as per this PyData Sphinx Theme guide. If we manage this, we could add a "dev" version in the switcher.

Maybe this is the priority for now?