warning This is in the very early stages of testing. You may feel free to try it, but file an issue with OTTR right away if it does not appear to be working as intended (or if you have other suggestions).
In some cases, if you have R Markdown files, markdown files, or even better, a bookdown set of files in an existing repository that you would like OTTR-fy you can do that following these steps. This method is a bit trickier and riskier than creating a repository from scratch and is still under some testing. So we recommend generally avoiding this strategy unless its unavoidable.
This set of steps also assumes you are more familiar with GitHub.
Navigate to the top of your repository.
You can do this by using wget, or by just using the link above and saving it as
ottr-fy.R in the top of your repository.
You’ve downloaded a script that will download the necessary files to run OTTR in your repository. Take a look at the filenames of what will be downloaded to make sure that you won’t accidentally overwrite any of your repository’s existing files.
* These files also will not be downloaded if you already have set up your repository as a bookdown website and specify this in the upcoming command.
Run this this script from your command line if your repository is not already a bookdown website.
If your repository is already configured as a bookdown website, then run this command (aka use the
Rscript ottr-fy.R --bookdown
Note if your GitHub repository is not configured, this script will not work.
This script will automatically: 1) Open a new branch called
robot/ottrfy. 2) Add the OTTR files listed above. 3) Add, commit, and push this branch to an
After that, you should go to your repository and open up a pull request. The OTTR automation checks should happen on this pull request automatically.
Render preview check will almost certainly fail until you complete the next step.
If they do not automatically start running, you may also want to check in your
Allow all actions and reusable workflows is chosen.
Check your files on this pull request your files and that nothing horrible has happened to your original files (like being overwritten or deleted).
You will almost certainly find that the
Render preview check will fail (and possibly the spelling and URL checks).
One reason that this will fail is that you will need to edit
_bookdown.yml to list your Rmds (or mds) in the order they should appear in the course. (See this section for more information about these checks and what they are)
Follow these instructions to add your Rmds and mds to the _bookdown.yml file.
Make sure to commit this to your branch. You will also likely want to update your
_output.yml file. Read here for more about how to customize this
* Note! Don’t merge this pull request before you finish adding a few settings as described in this next step.
From here, you can follow the rest of the steps described in the Getting Started section.