uwescience / SciPy2024-GitHubActionsTutorial

Content for SciPy 2024 Tutorial "Github Actions for Scientific Data Workflows."
https://uwescience.github.io/SciPy2024-GitHubActionsTutorial/
1 stars 1 forks source link

Conflicting Create Website and Jupyter Book gh-pages deployment. #17

Open valentina-s opened 1 week ago

valentina-s commented 1 week ago

Currently, whichever deployment is last will take over gh-pages. We can think how to make it work during the tutorial. Could just set them deploy from separate branches: and keep the Jupyter Book on except when we want to show the Create Webpage Example. On the participants fork we should make sure they have the create website deployment active only, since they do not need to rerender the jupyterbook website. Any better way to do this? I can also show things from a fork, and keep the uwescience one intact.

scottyhq commented 1 week ago

Yes, currently GitHub's deploy-pages action is "atomic" so it's all or nothing and not possible to just create a subpage on top of existing content (see https://github.com/actions/deploy-pages/issues/349)

For the tutorial I think it makes sense to show [.github/workflows/create_website.yml] on your fork to avoid overwriting the book (.github/workflows/create_website.yml)

You could add if: github.repository == 'uwescience/SciPy2024-GitHubActionsTutorial' under runs-on below to only deploy the book in this repository and not on participant forks:

https://github.com/uwescience/SciPy2024-GitHubActionsTutorial/blob/b7bdfdcbb4dc9f8085c70b3c93d287120c8e40ca/.github/workflows/deploy-book.yml#L17-L19