Skip to content

Commit

Permalink
fix(ci): fix quarto render without quartodoc and better speed
Browse files Browse the repository at this point in the history
  • Loading branch information
spool committed Jan 18, 2024
1 parent 73f4a2d commit eab98ac
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
27 changes: 21 additions & 6 deletions compose/docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
ARG QUARTO_VERSION="1.3.450"

FROM ghcr.io/quarto-dev/quarto:${QUARTO_VERSION} AS builder
# FROM ghcr.io/quarto-dev/quarto:${QUARTO_VERSION} AS builder
FROM registry.gitlab.com/quarto-forge/docker/polyglot as builder

ARG PORT=8080
ARG py_ver=3.9
ARG py_ver=3.10
ENV DEBIAN_FRONTEND=noninteractive

# ARG RIG_VERSION="latest"
Expand All @@ -22,11 +23,25 @@ WORKDIR /app
EXPOSE ${PORT}:${PORT}

# RUN quarto preview --port ${PORT}:${PORT}
RUN apt-get update && apt-get install -y python${py_ver} python3-pip r-base r-base-dev
RUN pip3 install quartodoc && quartodoc build
RUN Rscript -e 'install.packages("rmarkdown", repos="https://cloud.r-project.org")'
# RUN apt-get update && apt-get install -y python${py_ver} python3-pip r-base r-base-dev
# RUN micromamba install -y -n base quartodoc && quartodoc build

RUN quarto render
RUN micromamba config append channels conda-forge && \
micromamba install -y -n base quartodoc


USER root

# RUN micromamba run -n base quartodoc build && \
# micromamba run -n base quarto render

RUN micromamba run -n base quarto render

# RUN quartodoc build

# RUN Rscript -e 'install.packages("rmarkdown", repos="https://cloud.r-project.org")'

# RUN micromamba run -n base quarto render

FROM httpd:alpine
COPY --from=builder /app/_site/ /usr/local/apache2/htdocs/
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies:
- pytest-cov==4.1.0
- pytest-sugar==0.9.7
- pytz==2022.5
- quartodoc==0.6.3
- quartodoc==0.7.2
- rasterio==1.3.3
- rioxarray==0.12.3
- scipy==1.10.0
Expand Down

0 comments on commit eab98ac

Please sign in to comment.