Skip to content

Commit

Permalink
Update Staging branch with what's in main (#438)
Browse files Browse the repository at this point in the history
* Return to pre-gist method of spell check (#409)

* Return to pre-gist method of spell check

* Get rid of gist stuff on delete-preview too

* Temporarily add spelling errors to test

* Commit before testing

* Switch to use -z

* Fix git diff step

* Just look at the local main since it should be up to date

* make it simple

* Get rid of double bracket

* No brackets?

* Revert "Temporarily add spelling errors to test"

This reverts commit 9e9a932.

* Update screenshot for new repo (#410)

* Update template button screenshot (#411)

* Update screenshot for new repo

* Update template button too

* See if `fetch-depth: 0` fixes the shallow problem (#412)

* Update screenshot for new repo

* Update template button too

* fetch it all

* Switch to devtools::session_info()

* Render bookdown

* Update screenshot for git-secret.png (#414)

* Update screenshot for git-secret.png

* Crop off irrelevant git secrets

* syntax updates

* Needed a semicolon

* Fix branch handling

* Update spell check set up

* Update main

* add brackets

* set shell intentionally

* fix if statements

* Create PR if it can't push directly

* Make sure it merges

* Alter branch test

* quote the 0?

* switch to -z

* Delete extra then

* This should work

* Change to preview- again whoops

* Add a push step

* Update starting course

* set upstream

* Set to bash intentionally (#419)

* set to bash

* Update

* no workflow dispatch

* Test leanpub from here (#420)

* Test leanpub from here

* Update comments

* Add check quizzes too

* Couple edits

* Shut them off for now

* Update comments

* Render leanpub

* Minor polishing of steps (#421)

* Test leanpub from here

* Update comments

* Add check quizzes too

* Couple edits

* Shut them off for now

* Update comments

* Note which places needed to be uncommented

* Just making the step clearer

* Add a git fetch

* Add quizzes to spell check

* Update README.md

* Render leanpub

* Add new repository to sync

* Polish Examples in Rmds (#426)

* Echo false in examples

* Updating wiki

* Render bookdown

* Render bookdown (#427)

* Prep for ottr rename (#428)

* Render bookdown

* Make docker unfail (#431)

* Make docker not fail

* Add Dockerfile example

* Get rid of extra line

* Skip build for this test

* comment out push part too for this test

* undo test Dockerfile

* Render bookdown

* Try out screenshot creator as a part of the new Leanpub set up  (#422)

* Try out screenshot creator

* Fix spacing

* Get rid of typo

* fix argument spec

* Fix git pat handling

* Add copy over assets step

* Try this

* Try installing just the packages we need

* Add install of remotes

* Try using devtools instead

* try set environ

* Try to install R first

* Add prereqs

* Try rocker r-base

* Put installations in script

* Try different strategy

* Switch to tidyverse

* Make directory in bash

* I guess I'm making this its own docker image

* This isn't working but I want it in case I come back to it

* Switch to wkhtmltopdf

* Lets' try it

* Trying leanbuild steps on their own dockerfile

* Test build of leanbuild docker image

* Try out webshot r package

* fix file path to script

* Oh. Actually fix it

* Try installing webshot::install_phantomjs

* Try installing phantomjs on its own first

* Set this up

* Build from jhudsl/course_template

* Switch back to main dockerfile

* assets problem

* It works!

* Revert "assets problem"

This reverts commit 2aada9b.

* Add markdown maker basics

* Push this version before I delete things

* Clean up

* Delete the pdfs

* Reconfig with latest ottr package changes

* Turn on render again

* Add PR instead

* Move copying step

* Add an :: that was missing

* Fix arguments for getting pages url

* misplaced quotes

* Add make_book_txt = TRUE

* It's working! Undo the commenting part

* Set base to main

* Revert "It's working! Undo the commenting part"

This reverts commit 92e5081.

* rm manuscript folder

* Just commit to main

* Delete old manuscript files

* Copy over assets

* Render bookdown

* Remove manuscript if it is there

* Set group and user id to get rid of permissions probs

* Forgot \ 's

* Render bookdown

* Make it force push

* only force manuscript dir

* Render Leanpub

* Render Leanpub

* Render Leanpub

* Add to transfer PRs

* Delete manuscript folder

* Add to sync.yml

* Render Leanpub

* Remove _Template bit

* Add coursera bit and _Quizzes

* Clean out manuscript folder when starting new course

* Make transfers go to the right folder

* add /

* Update sync.yml with OTTR_Template_Website (#437)

Co-authored-by: jhudsl-robot <itcrtrainingnetwork@gmail.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: jhudsl-robot <97678365+jhudsl-robot@users.noreply.github.com>
Co-authored-by: Tiffany Miller <tiffanym@broadinstitute.org>
Co-authored-by: jhudsl-robot <itcrtrainingnetwork@gmail.com>
  • Loading branch information
5 people authored Feb 8, 2022
1 parent 99cc9ff commit 7d85450
Show file tree
Hide file tree
Showing 116 changed files with 1,988 additions and 587 deletions.
16 changes: 3 additions & 13 deletions .github/automatic-issues/git-secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,9 @@ It's important that these are set up and named exactly what they are below in or

To set up these repository secrets, on your repository's main Github page, go to `Settings` and scroll down to see `Secrets` on the left side menu bar.

For each new secret, click the `New repository secret` button and set each as follows, clicking `Add secret` as you fill each in appropriately:

- [ ] Set `DOCKERHUB_USERNAME`
`Name`: `DOCKERHUB_USERNAME`
`value`: put your login username for https://hub.docker.com/

- [ ] Set `DOCKERHUB_TOKEN`
`Name`:`DOCKERHUB_TOKEN`
`value`: put a access token for Dockerhub which you can create this by following [these instructions](https://docs.docker.com/docker-hub/access-tokens/#create-an-access-token).

- [ ] Set `GIT_TOKEN`
`Name`: `GIT_TOKEN`
`value`: A personal access token [following these instructions](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token#creating-a-token).
- [ ] Set `GH_PAT`
`Name`: `GH_PAT`
`value`: A personal access token [following these instructions](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#6-set-up-your-github-personal-access-token).
Underneath `Select scopes`, check both `repo` and `workflow`.
Then copy the PAT and save as the value.

Expand Down
4 changes: 2 additions & 2 deletions .github/automatic-issues/images-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ See [Setting Up Images and Graphics](https://github.com/jhudsl/OTTR_Template/wik
- [ ] The color palette choices of the slide are contrasted in a way that is friendly to those with color vision deficiencies.
You can check this using [Color Oracle](https://colororacle.org/).

- [ ] Every image is [inserted into the text](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics#adding-images-and-graphics-in-text) using one of these options: `leanbuild::include_slide()`, `knitr::include_image()`, or this format: `<img src="blah.png" alt="SOMETHING">`.
- [ ] Every image is [inserted into the text](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics#adding-images-and-graphics-in-text) using one of these options: `ottr::include_slide()`, `knitr::include_image()`, or this format: `<img src="blah.png" alt="SOMETHING">`.

- [ ] Every image has [alternative text added to it](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics#adding-images-and-graphics-in-text).

- [ ] The beginning of each Rmd contains this chunk so the images are saved in the correct spot:

`````
```{r, include = FALSE}
leanbuild::set_knitr_image_path()
ottr::set_knitr_image_path()
```
`````
30 changes: 17 additions & 13 deletions .github/automatic-issues/set-repo-settings.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@

For more information on these settings see instructions in the [getting started GitHub wiki pages](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-your-repository-settings).

### Needed settings:
For more information on these settings see instructions in the [getting started GitHub wiki pages](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course).

- [ ] This course repository is set to `public`.
- [ ] [Add the `jhudsl-robot` as a collaborator to your repository.](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-your-repository-settings#add-jhudsl-robot-as-a-collaborator).
- [ ] [GH_PAT has been set up as a GitHub secret](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#6-set-up-your-github-personal-access-token)

#### Turn on GitHub pages
- [ ] Go to `Settings` > `Pages`. Underneath `Source`, choose `main` for the branch and select the `docs` folder. Then click `Save`.
- [ ] Check `Enforce HTTPS`.
- [ ] GitHub pages is turned on
- [ ] Go to `Settings` > `Pages`. Underneath `Source`, choose `main` for the branch and select the `docs` folder. Then click `Save`.
- [ ] Check `Enforce HTTPS`.

#### Set protections for main branch
\* Don't set these settings right away! Wait a few minutes after starting your repository.
- [ ] [Github secret `GH_PAT` has been set](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#6-set-up-your-github-personal-access-token)
`Name`: `GH_PAT`
`value`: A personal access token [following these instructions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-token).
Underneath `Select scopes`, check both `repo` and `workflow`.
Then copy the PAT and save as the value.

- [ ] `main` branch has been set up:
- [ ] `Require pull request reviews before merging` box is checked.
- [ ] `Require status checks to pass before merging` box is checked.
- [ ] Underneath that `Require branches to be up to date before merging` box is checked.
- [ ] Click `Save` at the bottom of the page!
- [ ] [Set branch protections settings](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#9-set-up-branch-rules)
- [ ] `main` branch has been set up:
- [ ] `Require pull request reviews before merging` box is checked.
- [ ] `Require status checks to pass before merging` box is checked.
- [ ] Underneath that `Require branches to be up to date before merging` box is checked.
- [ ] Click `Save` at the bottom of the page!
29 changes: 15 additions & 14 deletions .github/automatic-issues/templates-to-edit.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@

[Follow the Wiki instructions here](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-your-repository-files#setting-up-the-repository) for details on how to complete the items in this issue.
[Follow the Wiki instructions here](https://github.com/jhudsl/OTTR_Template/wiki/Start-editing-your-course) for details on how to complete the items in this issue.

The following files need to be edited to get this new course started!

### Picking a style

See more [about customizing style on this page in the guide](https://github.com/jhudsl/OTTR_Template/wiki/Change-Title-&-Customize-style).
By default this course template will use the jhudsl data science lab style. However, you can customize and switch this to another style set.

#### Using a style set

[Read more about the style sets here](https://github.com/jhudsl/OTTR_Template/wiki/Change-Title-&-Customize-style#using-a-style-set).

- [ ] On a new branch, copy the `style-sets/<set-name>/index.Rmd` and `style-sets/<set-name>/_output.yml` to the top of the repository to overwrite the default `index.Rmd` and `_output.yml`.
- [ ] Copy over all the files in the `style-sets/<set-name>/copy-to-assets` to the `assets` folder in the top of the repository.
- [ ] [Create a pull request](https://github.com/jhudsl/OTTR_Template/wiki/About-pull-request-review) with these changes, and double check the rendered preview to make sure that the style is what you are looking for.

### Files that need edited upon creating a new course.

- [ ] `README.md` - Fill in all the `{ }`.
Expand All @@ -28,6 +15,20 @@ By default this course template will use the jhudsl data science lab style. Howe
- [ ] `_bookdown.yml` - The list of Rmd files that need to be rendered needs to be updated. See [instructions](https://github.com/jhudsl/OTTR_Template/wiki/Publishing-with-Bookdown).
- [ ] `book.bib` - any citations need to be added. See [instructions](https://github.com/jhudsl/OTTR_Template/wiki/Citations).


### Picking a style

See more [about customizing style on this page in the guide](https://github.com/jhudsl/OTTR_Template/wiki/Change-Title-&-Customize-style).
By default this course template will use the jhudsl data science lab style. However, you can customize and switch this to another style set.

#### Using a style set

[Read more about the style sets here](https://github.com/jhudsl/OTTR_Template/wiki/Change-Title-&-Customize-style#using-a-style-set).

- [ ] On a new branch, copy the `style-sets/<set-name>/index.Rmd` and `style-sets/<set-name>/_output.yml` to the top of the repository to overwrite the default `index.Rmd` and `_output.yml`.
- [ ] Copy over all the files in the `style-sets/<set-name>/copy-to-assets` to the `assets` folder in the top of the repository.
- [ ] [Create a pull request](https://github.com/jhudsl/OTTR_Template/wiki/Start-editing-your-course#getting-started-with-the-github-workflow) with these changes, and double check the rendered preview to make sure that the style is what you are looking for.

### Files that need to be edited upon adding new packages that the book's code uses:

- `docker/Dockerfile` needs to have the new package added so it will be installed. See [instructions](https://github.com/jhudsl/OTTR_Template/wiki/Using-Docker#starting-a-new-docker-image).
Expand Down
4 changes: 2 additions & 2 deletions .github/automatic-issues/update-enrollment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ We are working on adding more features and smoothing out bugs as we go.

If you want to receive updates from the original template to your course template, you will need to enroll this repository to the template updates by adding it to the `sync.yml` file.

- [ ] [Follow these instructions](https://github.com/jhudsl/OTTR_Template/wiki/Receiving-template-updates#how-to-enroll-a-repository-to-receive-template-updates) to enroll your course repository to receive these updates.
- [ ] [Follow these instructions](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#10-enroll-your-repository-for-ottr-updates) to enroll your course repository to receive these updates.

- [ ] [Ensure that you have followed these instructions](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-your-repository-settings#add-jhudsl-robot-as-a-collaborator) to add the `jhudsl-robot` as a collaborator to your repository.
- [ ] [Ensure that you have followed these instructions](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#5-add-jhudsl-robot-as-a-collaborator) to add the `jhudsl-robot` as a collaborator to your repository.
14 changes: 14 additions & 0 deletions .github/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ group:
jhudsl/GDSCN_Book_SARS_Galaxy_on_AnVIL
abyzovlab/CNVpytor_course
opencasestudies/OCS_Guide
tmm211/dsp-terra-mooc-test2
###ADD NEW REPO HERE following the format above#
files:
- source: .github/workflows/render-bookdown.yml
dest: .github/workflows/render-bookdown.yml
- source: .github/workflows/render-preview.yml
dest: .github/workflows/render-preview.yml
- source: .github/workflows/render-leanpub.yml
dest: .github/workflows/render-leanpub.yml
- source: .github/workflows/docker-build-test.yml
dest: .github/workflows/docker-build-test.yml
- source: .github/workflows/transfer-rendered-files.yml
Expand All @@ -44,6 +47,8 @@ group:
dest: .github/ISSUE_TEMPLATE/course-problem-report.md
- source: .github/ISSUE_TEMPLATE/course-content-add.md
dest: .github/ISSUE_TEMPLATE/course-content-add.md
- source: scripts/make_screenshots.R
dest: scripts/make_screenshots.R
- source: scripts/spell-check.R
dest: scripts/spell-check.R
- source: scripts/get_spell_errors.R
Expand All @@ -55,6 +60,15 @@ group:
- source: style-sets
dest: style-sets

repos: |
jhudsl/OTTR_Template_Website
- source: .github/workflows/style-and-sp-check.yml
dest: .github/workflows/style-and-sp-check.yml
- source: .github/workflows/url-checker.yml
dest: .github/workflows/url-checker.yml
- source: scripts/spell-check.R
dest: scripts/spell-check.R

###### TO ADD NEW REPOSITORY USE THIS FORMAT; Feel free to add/drop files that
# you specifically would like synced (or not).
#
Expand Down
117 changes: 117 additions & 0 deletions .github/workflows/check-quizzes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@

# Candace Savonen Jan 2022

name: Check Leanpub Quizzes

on:
workflow_dispatch:
### UNCOMMENT THIS SECTION IF YOU WISH PREPARE YOUR COURSE QUIZZES FOR LEANPUB AUTOMATICALLY
# pull_request:
# branches: [ main, staging]
# paths:
# - 'quizzes/*'
######### END OF SECTION #########

jobs:
check-quizzes:
runs-on: ubuntu-latest
container:
image: jhudsl/course_template

steps:
- name: Checkout files
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure git
run: |
git config --local user.email "itcrtrainingnetwork@gmail.com"
git config --local user.name "jhudsl-robot"
branch_name='check-${{ github.event.pull_request.number }}'
exists=$(git ls-remote https://${{ secrets.GH_PAT }}@github.com/$GITHUB_REPOSITORY $branch_name | wc -l | xargs)
if [[ $exists == 0 ]];then
echo branch doesnt exist
git checkout -b $branch_name
git push --set-upstream origin $branch_name
else
echo branch does exist
git fetch --all
git checkout $branch_name
git merge -s recursive --strategy-option=theirs origin/${{ github.head_ref }}
fi
shell: bash

- name: Run quiz check
id: quiz_check_run
run: |
Rscript -e "ottr::check_quizzes(quiz_dir = 'quizzes', write_report = TRUE, verbose = TRUE)"
results=0
if -f "question_error_report.tsv"; then
results=$(wc -l < question_error_report.tsv >/dev/null)
fi
echo ::set-output name=quiz_chk_results::$results
- name: Commit quiz check errors
run: |
branch_name='check-${{ github.event.pull_request.number }}'
git diff --name-only origin/main -- question_error_report.tsv >/dev/null && changes=true || changes=false
echo $changes
if $changes == true; then
git diff --name-only origin/$branch_name question_error_report.tsv >/dev/null && changes=true || changes=false
echo $changes
if $changes == true; then
git add --force question_error_report.tsv
git diff-index --quiet HEAD || git commit -m 'Add question error report file'
git pull --set-upstream origin $branch_name --allow-unrelated-histories
git push origin $branch_name
fi
fi
- name: Build components of the quiz check comment
id: build-components
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
branch_name='check-${{ github.event.pull_request.number }}'
quiz_error_url=https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/$branch_name/question_error_report.tsv
echo ::set-output name=time::$(date +'%Y-%m-%d')
echo ::set-output name=commit_id::$GITHUB_SHA
echo ::set-output name=quiz_error_url::$quiz_error_url
# Handle the commenting
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: quiz errors

- name: Quiz errors!
if: ${{ steps.quiz_check_run.outputs.quiz_chk_results >= 2 }}
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
:warning: There are quiz errors that need to be addressed. [Read this guide for more info](https://github.com/jhudsl/OTTR_Template/wiki/Publishing-on-Leanpub#setting-up-quizzes).
[Download the errors here.](${{ steps.build-components.outputs.quiz_error_url }})
_Comment updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_
edit-mode: replace

- name: Check quiz check results - fail if too many errors
if: ${{ steps.quiz_check_run.outputs.quiz_chk_results >= 2 }}
run: exit 1

- name: No quiz errors
if: ${{ steps.quiz_check_run.outputs.quiz_chk_results < 2 }}
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
No quiz errors detected! :tada:
_Comment updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_
edit-mode: replace
12 changes: 0 additions & 12 deletions .github/workflows/delete-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,3 @@ jobs:
with:
github_token: ${{ secrets.GH_PAT }}
branches: preview-${{ github.event.pull_request.number }}

- name: Delete gist
id: gist
run: |
echo ${{ secrets.GH_PAT }} > docker/git_token.txt
gist_key=${GITHUB_REPOSITORY}_spell_check_${{ github.event.pull_request.number }}
gist_url=$(Rscript --vanilla scripts/get_the_gist.R \
--git_pat docker/git_token.txt \
--gist_key $gist_key \
--file resources/spell_check_results.tsv \
--delete)
rm docker/git_token.txt
9 changes: 7 additions & 2 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ jobs:
if: ${{ github.head_ref == 'repo-sync/OTTR_Template/default' }}
run: |
echo This was tested on OTTR_Template no need to re-run
exit 1
# Set up Docker build
- name: Set up Docker Buildx
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: docker/setup-buildx-action@v1

# Setup layer cache
- name: Cache Docker layers
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
Expand All @@ -61,13 +62,16 @@ jobs:
# Set up Docker build
- name: Set up Docker Build
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: docker/setup-buildx-action@v1

- name: Get token
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
run: echo ${{ secrets.GH_PAT }} > docker/git_token.txt

# Build docker image
- name: Build Docker image
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: docker/build-push-action@v2
with:
push: false
Expand All @@ -90,6 +94,7 @@ jobs:
run: docker push jhudsl/course_template

- name: Get the version
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
id: get_version
run: |
echo ::set-output name=version::$(echo $GITHUB_REF | cut -d / -f 3)
Expand All @@ -99,4 +104,4 @@ jobs:
if: ${{ github.event_name == 'release' }}
run: |
docker tag jhudsl/course_template:latest jhudsl/course_template:${{ steps.get_version.outputs.version }}
docker push jhudsl/course_template:1.0
docker push jhudsl/course_template:${{ steps.get_version.outputs.version }}
18 changes: 14 additions & 4 deletions .github/workflows/render-bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
# This workflow contains a single job called "build-all"
render-main:
runs-on: ubuntu-latest
container:
image: jhudsl/course_template

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down Expand Up @@ -75,13 +74,24 @@ jobs:
# Run bookdown rendering
- name: Run bookdown render
id: bookdown
run: Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')"
run: |
docker run \
--mount type=bind,target=/home/rstudio,source=$PWD \
--user "$(id -u):$(id -g)" \
jhudsl/course_template \
Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all');
file.copy(from = 'assets', to = 'docs/assets', overwrite = TRUE)"
##### If you do not wish to host your course on Coursera, you can delete this section #####
# Run Coursera version
- name: Run Coursera version of render
id: coursera
run: Rscript -e "leanbuild::render_coursera()"
run: |
docker run \
--mount type=bind,target=/home/rstudio,source=$PWD \
--user "$(id -u):$(id -g)" \
jhudsl/course_template \
Rscript -e "ottr::render_coursera()"
##### End of Coursera rendering section ########################################

Expand Down
Loading

0 comments on commit 7d85450

Please sign in to comment.