-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File automatic issues using GHA #66
Changes from all commits
ddd5396
d61cb8e
aa0201a
6f47d64
e11d09d
921f73b
c225350
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
**Note these steps are only pertinent if you are setting up this website outside of the jhudsl organization** | ||
|
||
For more information on these settings see instructions in the [getting started on ottrproject.org](https://www.ottrproject.org/getting_started.html#6_Set_up_your_GitHub_personal_access_token). | ||
|
||
It's important that these are set up and named exactly what they are below in order for Github actions to work correctly. | ||
|
||
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. | ||
|
||
- [ ] Set `GH_PAT` | ||
`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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
For more information on these settings see instructions in [Starting a new OTTR website](https://www.ottrproject.org/getting_started.html#starting-a-new-ottr-course). | ||
|
||
- [ ] This website repository is set to `public`. | ||
|
||
- [ ] [Github secret `GH_PAT` has been set](https://www.ottrproject.org/getting_started.html#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. | ||
|
||
- [ ] 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 branch protections settings](https://www.ottrproject.org/getting_started.html#8_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! | ||
|
||
- [ ] [Customize GitHub actions](https://www.ottrproject.org/customize-robots.html) for what you will need in this website. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also copied-pasted this file from the OTTR Template website. I edited the |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
[Follow the instructions here in ottrproject.org](https://www.ottrproject.org/editing_website.html) for details on how to start editing your OTTR website. | ||
|
||
The following files need to be edited to get this new website started! | ||
|
||
### Files that need edited upon creating a new website. | ||
|
||
- [ ] `README.md` - Fill in the README with the title of the website, a brief description of the website, and any other details that would be useful for anyone who encounters your website. | ||
- [ ] `index.Rmd` - Update the `title` field. Since this Rmd file serves as the website's landing page, include any information you believe will be beneficial for visitors upon their arrival. | ||
|
||
|
||
### Files that need to be edited upon adding each new page. | ||
|
||
- [ ] `_site.yml` - Include the title of your newly created page in the `text` field, and insert the corresponding html file name into the `href` field. | ||
|
||
### Picking a style | ||
|
||
See more [about customizing style on this page in the guide](https://www.ottrproject.org/customize-style.html). | ||
By default this website 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://www.ottrproject.org/customize-style.html#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://www.ottrproject.org/writing_content.html#Open_a_pull_request) 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://www.ottrproject.org/customize-docker.html). | ||
- The code chunk in `index.Rmd` should be edited to add the new package. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
The original template: https://github.com/jhudsl/OTTR_Template_Website is always a work in progress. | ||
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 website template, you will need to enroll this repository to the template updates by adding it to the `sync.yml` file. | ||
|
||
- [ ] [Follow these instructions](https://www.ottrproject.org/getting_started.html#9_Enroll_your_repository_for_OTTR_updates) to enroll your website repository to receive these updates. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is my naive attempt at using GHA to file automatic issues. I was wondering whether we need to include |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Code adapted from https://github.com/JetBrains/intellij-platform-plugin-template/blob/deb171483598ee8a5d7621154db880e87b4db4ef/.github/workflows/template-cleanup.yml | ||
# by Candace Savonen for this repository. | ||
|
||
name: Starting a website | ||
|
||
on: | ||
push: | ||
branches: [ main, staging ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# Run cleaning process only if workflow is triggered by not being in the Bookdown template anymore | ||
template-cleanup: | ||
name: Template Cleanup | ||
runs-on: ubuntu-latest | ||
if: github.event.repository.name != 'OTTR_Template_Website' | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
# Issue for what repository settings need to be set | ||
- name: New Course - Set Repository Settings | ||
uses: peter-evans/create-issue-from-file@v4 | ||
with: | ||
title: New Course - Set Repository Settings | ||
content-filepath: .github/automatic-issues/set-repo-settings.md | ||
labels: automated training issue | ||
|
||
# Issue for what needs to be edited | ||
- name: New Course - Templates to Edit | ||
uses: peter-evans/create-issue-from-file@v4 | ||
with: | ||
title: New Course - Templates to Edit | ||
content-filepath: .github/automatic-issues/templates-to-edit.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@v4 | ||
with: | ||
title: New Course - Template Update Enrollment | ||
content-filepath: .github/automatic-issues/update-enrollment.md | ||
labels: automated training issue |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.Rhistory | ||
.RData | ||
.Ruserdata | ||
.DS_Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what to do with this file. This was transported over from OTTR Template, but is not used in that repo.