diff --git a/.github/automatic-issues/git-secrets.md b/.github/automatic-issues/git-secrets.md index abd7c68c..a2c9747b 100644 --- a/.github/automatic-issues/git-secrets.md +++ b/.github/automatic-issues/git-secrets.md @@ -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. diff --git a/.github/automatic-issues/set-repo-settings.md b/.github/automatic-issues/set-repo-settings.md index 2a12b0e0..4d0081b0 100644 --- a/.github/automatic-issues/set-repo-settings.md +++ b/.github/automatic-issues/set-repo-settings.md @@ -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! diff --git a/.github/automatic-issues/templates-to-edit.md b/.github/automatic-issues/templates-to-edit.md index 271ca4a2..4c938b96 100644 --- a/.github/automatic-issues/templates-to-edit.md +++ b/.github/automatic-issues/templates-to-edit.md @@ -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//index.Rmd` and `style-sets//_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//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 `{ }`. @@ -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//index.Rmd` and `style-sets//_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//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). diff --git a/.github/automatic-issues/update-enrollment.md b/.github/automatic-issues/update-enrollment.md index e68a701e..e5c42f29 100644 --- a/.github/automatic-issues/update-enrollment.md +++ b/.github/automatic-issues/update-enrollment.md @@ -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. diff --git a/.github/workflows/starting-course.yml b/.github/workflows/starting-course.yml index e688ec22..a5438049 100644 --- a/.github/workflows/starting-course.yml +++ b/.github/workflows/starting-course.yml @@ -98,14 +98,6 @@ jobs: content-filepath: .github/automatic-issues/templates-to-edit.md labels: automated training issue - # Issue for what github secrets that need to be set - - name: New Course - Set Github Secrets - uses: peter-evans/create-issue-from-file@v2.3.2 - with: - title: New Course - Set Github Secrets - content-filepath: .github/automatic-issues/git-secrets.md - labels: automated training issue - # Issue for how to enroll repo for updates - name: New Course - Template Update Enrollment uses: peter-evans/create-issue-from-file@v2.3.2 diff --git a/02-chapter_of_course.Rmd b/02-chapter_of_course.Rmd index 18b1f6d3..95fbb5ce 100644 --- a/02-chapter_of_course.Rmd +++ b/02-chapter_of_course.Rmd @@ -1,5 +1,5 @@ -# A new chapter +# A new chapter *If you haven't yet read the getting started Wiki pages; [start there](https://github.com/jhudsl/OTTR_Template/wiki/Getting-started) @@ -63,7 +63,6 @@ dev.off() ### Image example - How to include a Google slide. It's simplest to use the `leanbuild` package: ```{r, fig.align='center', echo = FALSE, fig.alt= "Major point!! example image"} @@ -74,12 +73,17 @@ But if you have the slide or some other image locally downloaded you can also us Major point!! example image - ### Video examples -You can use `knitr::include_url()` like this: +To show videos in your course, you can use markdown syntax like this: -```{r} +[A video we want to show](https://www.youtube.com/embed/VOCYL-FNbr0) + +Alternatively, you can use `knitr::include_url()` like this: +Note that we are using `echo=FALSE` in the code chunk because we don't want the code part of this to show up. +If you are unfamiliar with [how R Markdown code chunks work, read this](https://rmarkdown.rstudio.com/lesson-3.html). + +```{r, echo=FALSE} knitr::include_url("https://www.youtube.com/embed/VOCYL-FNbr0") ``` @@ -109,7 +113,7 @@ Examples of including a website link. This works: -```{r, fig.align="center"} +```{r, fig.align="center", echo=FALSE} knitr::include_url("https://yihui.org") ```