-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.Rmd
More file actions
60 lines (39 loc) · 2.62 KB
/
Copy pathsetup.Rmd
File metadata and controls
60 lines (39 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: "Setup"
output: html_document
---
### Getting started
Create your repository by clicking on the `Use this Template` button at [OTTR_Template_Website repository](https://github.com/jhudsl/OTTR_Template_Website)

You'll need to make your repository `public`.
### Set your GH_PAT
To enable the GitHub actions, your repository needs to be setup in a specific way.
For OTTR GitHub actions to run, they need to have credentials through a personal access token.
1. Set up your own personal access token [following these instructions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). Keep this personal access token handy for the next step. When you get to the permissions page, check the box that says `repo` and select all that is underneath that header. No other permissions are necessary.
2. In your new OTTR_Template_Website derived repository, go to Settings > Secrets > Actions. Click `New Repository Secret`. In the window opened, name this new secret `GH_PAT` and paste the personal access token in the box below. (Note that the name `GH_PAT` is specific to how OTTR works and other secret names cannot be used and for OTTR to still work).
```{r, fig.align='center', fig.alt= "Clicking on settings", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/setting_gh_pat.png")
```
### Protect branches
Although this isn't entirely required, its strongly recommended that you use these settings to protect your `main` branches.
Click on settings in the far upper right corner:
```{r, fig.align='center', fig.alt= "Clicking on settings", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/settings.png")
```
Click on branches:
```{r, fig.align='center', fig.alt= "Clicking on settings", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/branches.png")
```
Click the add rule button.
```{r, fig.align='center', fig.alt= "Adding rule", echo = FALSE}
knitr::include_graphics("resources/images/add_rule.png")
```
Type "main" as the branch name pattern:
```{r, fig.align='center', fig.alt= "adding main branch rule", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/main_branch.png")
```
Click on the following boxes to require pull requests before merging:
```{r, fig.align='center', fig.alt= "modify branch rules", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/branch_rule.png")
```
Note that if you have admin privileges on this repository, you will likely still be able to override these branch protections so use caution when git pushing!