Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish site via GitHub Actions #349

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Publish site via GitHub Actions #349

merged 3 commits into from
Mar 28, 2024

Conversation

bennibbelink
Copy link
Contributor

Closes #344. Instead of maintaining a main branch to publish the site this will publish the site via a GitHub workflow on any merge to source. Attempting to follow best practices outlined in GitHub documentation.

@bennibbelink
Copy link
Contributor Author

Comment from the linked issue:

That said, this relies in our custom build docker images having the right config. We probably want that to be part of the workflow somewhere? I'm not sure all the images have Sphinx. I saw that install in your sample build, but I didn't really see where that happened in your sample PR.

I updated docker/fuelcycle.org-deps/Dockerfile to build FROM our latest cymetric image and install Sphinx. This should ensure that all of our cyclus libraries exist in the docker image. I also modified the docker-gh-preview docker-html targets to docker build using the Dockerfile. Thus in the workflow we just need to call make docker-html to build the site.

@bennibbelink
Copy link
Contributor Author

Another advantage of this moving forward is that to publish the site when we make changes to the cyclus/cyclus repo we need only run the workflow via workflow_dispatch (for example after we update the dependencies in the cyclus/cyclus documentation)

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just one question about the them pinning

RUN pip3 install sphinx sphinxcontrib-bibtex
RUN pip3 install cloud-sptheme==1.6
RUN apt-get install -y --force-yes wget python3-pip
RUN python -m pip install sphinx sphinxcontrib-bibtex cloud-sptheme==1.6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this pinning to preserve the sidebar menu? If so, let's add an issue to update our templates for a newer theme version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why it is pinned at 1.6, that's just what was there. I'll make an issue regardless and try to resolve the sidebar complications.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not for any reason, maybe let's drop the pin and see what we get?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dropped the pin and don't notice any significant changes (if any at all). If you want you can download the artifact generated by the action and check it out yourself! 😃

https://github.com/cyclus/cyclus.github.com/actions/runs/8461607773

@gonuke gonuke merged commit 344f1ba into source Mar 28, 2024
4 checks passed
@bennibbelink bennibbelink deleted the ci-publishing branch March 28, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish site using Github Actions
2 participants