diff --git a/Makefile b/Makefile index 2406488b..f230df83 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,10 @@ gh-preview html: @echo "Build finished. The HTML pages are in $(BUILDDIR)." docker-gh-preview docker-html: - docker build -f docker/Dockerfile -t site-deps . - docker run -w /cyclus.github.com -v $(PWD):/cyclus.github.com site-deps bash -c "make gh-preview && chmod -R 777 $(BUILDDIR)" + docker build --platform linux/amd64 -f docker/Dockerfile -t site-image --build-arg BUILDDIR=$(BUILDDIR) --progress plain . + docker create --platform linux/amd64 --name site-container site-image sleep + docker cp site-container:/$(BUILDDIR) $(BUILDDIR) + docker rm site-container serve: html cd $(BUILDDIR) && python -m http.server diff --git a/docker/Dockerfile b/docker/Dockerfile index b2aa15c3..e7c4c1b3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,3 +1,23 @@ -FROM ghcr.io/cyclus/cymetric_22.04_conda/cymetric:latest +FROM ghcr.io/cyclus/cymetric_22.04_conda/cymetric:latest AS base-image +ARG BUILDDIR=gh-preview RUN mamba install -y sphinx sphinxcontrib-bibtex cloud_sptheme + +COPY . /cyclus.github.com +WORKDIR /cyclus.github.com +RUN make gh-preview + +WORKDIR /cyclus/build +RUN make cyclusdoc && \ + mkdir -p /cyclus.github.com/${BUILDDIR}/cyclus/api && \ + cp -r doc/html/* /cyclus.github.com/${BUILDDIR}/cyclus/api/ + +WORKDIR /cycamore/build +RUN make cycamoredoc && \ + mkdir -p /cyclus.github.com/${BUILDDIR}/cycamore/api && \ + cp -r doc/html/* /cyclus.github.com/${BUILDDIR}/cycamore/api/ + + +FROM scratch +ARG BUILDDIR=gh-preview +COPY --from=base-image /cyclus.github.com/${BUILDDIR} /${BUILDDIR} diff --git a/source/atemplates/sidebar.html b/source/atemplates/sidebar.html index d040d987..3df52f71 100644 --- a/source/atemplates/sidebar.html +++ b/source/atemplates/sidebar.html @@ -8,8 +8,8 @@

{{ _('Useful Pages') }}

  • Archetype Developer Guide
  • Archetype Developer C++ Tutorial
  • Archetype Developer Python Tutorial
  • -
  • Cyclus API Documentation
  • -
  • Cycamore API Documentation
  • +
  • Cyclus API Documentation
  • +
  • Cycamore API Documentation
  • Glossary
  • Join the Cyclus Users mailing list.