From ddae331b648cb60de66376dc90d52ad86650099e Mon Sep 17 00:00:00 2001 From: avahoffman Date: Wed, 15 Jan 2025 15:29:37 -0500 Subject: [PATCH] Restore student guide build --- .github/workflows/pull_request.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 8309b37d..6f8531ea 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -187,6 +187,23 @@ jobs: if: ${{needs.yaml-check.outputs.toggle_website == 'quarto' }} run: Rscript -e "quarto::quarto_render('.')" + # Render a student guide if specified. This is a bit clunky because + # Bookdown does not work well if the files aren't named as such in the + # root directory + - name: Run student guide render + if: ${{needs.yaml-check.outputs.toggle_student_guide == 'yes'}} + id: student_guide + run: | + mkdir tmp1 + mv _bookdown.yml _output.yml tmp1 + mv student-guide/_bookdown.yml student-guide/_output.yml . + Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')" + mv _bookdown.yml _output.yml student-guide + mv tmp1/_bookdown.yml tmp1/_output.yml . + rm -r tmp1 + git add student-guide/* + git commit -m 'Create student guide' || echo "No changes to commit" + # This checks on the steps before it and makes sure that they completed. # If the renders didn't complete we don't want to commit the file changes - name: Check on Rmd render steps