Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ottrpal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM jhudsl/base_ottr:dev
LABEL maintainer="cansav09@gmail.com"

WORKDIR /app
WORKDIR /app

COPY entrypoint.sh .

RUN chmod +x entrypoint.sh

ENTRYPOINT ["/app/entrypoint.sh"]

WORKDIR /home
17 changes: 11 additions & 6 deletions ottrpal/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

if [ "$1" = "rmd" ]; then
Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')"
elif [ "$1" = "quarto" ]; then
elif [ "$1" = "quarto" ] || [ "$1" = "quarto_web" ]; then
Rscript -e "quarto::quarto_render('.')"
elif [ "$1" = "rmd_web" ]; then
Rscript -e "rmarkdown::render_site()"
elif [ "$1" = "spelling" ] || [ "$1" = "urls" ] || [ "$1" = "quiz_format" ]; then
Rscript -e "ottrpal::ottr_check(check_type = '$1')"
# Save output
echo "error_name=$error_name" >> $GITHUB_OUTPUT
echo "report_path=$report_path" >> $GITHUB_OUTPUT
echo "chk_results=$chk_results" >> $GITHUB_OUTPUT

# Save output if we are on github
if [ -n "$GITHUB_REPOSITORY" ]; then
echo "error_name=$error_name" >> $GITHUB_OUTPUT 2>/dev/null
echo "report_path=$report_path" >> $GITHUB_OUTPUT 2>/dev/null
echo "chk_results=$chk_results" >> $GITHUB_OUTPUT 2>/dev/null
fi
else
echo Viable options are "render_rmd", "render_quarto", "spelling", "urls", "quiz_format"
echo Error: Viable options are "render_rmd", "render_quarto", "spelling", "urls", "quiz_format"
fi