Skip to content

Start a new course

Candace Savonen edited this page Feb 3, 2022 · 34 revisions

1. Create a repository from this template

In the upper right of the landing page for this repository, click the green Use this template button and follow the steps to set up your course's GitHub repository.

Where is the Use this template button?

2. Name your repository and fill in a short description.

Creating new course repository

3. Your course must be set to public for Github actions to work.

4. Set up a Git client

If you do not have a method of working with Git already it is recommended you use a git client to help you manage your branches more easily. Install GitKraken for a handy way to manage your course locally.

5. Add jhudsl-robot as a collaborator

*You can skip this step if your course is in the jhudsl organization.

The Github actions in this repository need permissions to fully function. To this end, you need to add the jhudsl-robot as a collaborator on your repository with write permissions.

In your repository, go to your Settings > Collaborators & Teams and click on Add people. In the pop up window, search for and add jhudsl-robot.

Choose the write option then click Add jhudsl-robot to this repository.

6. Set up your Github Personal access token

The OTTR robots need permissions to run some of the actions. You only need to do this once as an organization (if this course is under jhudsl you don't need to do this step).

To give them permission for all the actions, you need to set a GitHub secret. Go to Settings > Secrets and scroll down to organization secrets or you can set this for each repository by creating a repository secret.

  • Click New repository secret button.
  • Under name you must use GH_PAT.
  • For value: Create a personal access token following these instructions. Underneath Select scopes, check both repo and workflow. Then copy the PAT and save as the value. Your Github actions should all be able to run smoothly now.

7. Set up your repository's settings

With your course repository set up, there are some settings recommended for development.

Issues for getting your course started will be automatically filed in your repository. Go to Issues and you can follow them along to get set up.

8. Set up GitHub pages

Go to Settings > Pages.

Find pages settings

Change pages settings

  • Under Source, pick the drop down menu and pick main and /docs.
  • Then click Save.
  • Lastly, check the box that says Enforce HTTPS at the bottom of this page.

Enforce HTTPS

9. Set up branch rules

* Don't set these settings right away! Wait a few minutes after starting your repository.

Go to Settings > Branches and click Add rule. This is only possible if you have GitHub Pro, Team, or Enterprise access. We recommend seeing if your organization can give you access if you do not already have access. To get this access through your organization, you will need to transfer ownership of your repo to your organization. See here about how to do this.

Add branch rule

For Branch name pattern, put main.

Put main for branch name pattern

Protect the main branch:
Then check the box that says Require pull requests before merging.

Make sure branches are updated:

  • Check the box that says Require status checks to pass before merging.
  • Underneath this also check the box that says Require branches to be up to date before merging.

Branch settings

After setting up these new branch items, click Create and Save changes.

10. Enroll your repository for OTTR updates

There is one more issue that you can do to get updates for template files. one more issue

We recommend that you do this but it is optional.

one more issue

See this section to learn more about this or continue following along with the guide which will tell you how to set this up in a bit.

Note that you can comment and close the issues you finish if you click on the issue and scroll down to the comment field to add comments and click the close issue button if you are finished.

Clone this wiki locally