Skip to content

Commit 2f2d100

Browse files
authored
Initial commit
0 parents  commit 2f2d100

File tree

235 files changed

+25718
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+25718
-0
lines changed

.DS_Store

8 KB
Binary file not shown.

.github/.DS_Store

6 KB
Binary file not shown.

.github/workflows/setup-repo.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Setup Workshop from Config
2+
3+
on:
4+
push:
5+
paths:
6+
- 'workshop_config.json'
7+
8+
jobs:
9+
replace-variables:
10+
if: github.repository != 'cbw-dev/bookdown-template'
11+
permissions:
12+
contents: write
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
# --- CHANGE: This step now checks the config and sets an output ---
20+
- name: Load Variables and Check Config
21+
id: config
22+
run: |
23+
# Load all variables into the environment for later steps
24+
echo "WORKSHOP_CODE=$(jq -r .workshop_code workshop_config.json)" >> $GITHUB_ENV
25+
echo "WORKSHOP_NAME=$(jq -r .workshop_name workshop_config.json)" >> $GITHUB_ENV
26+
echo "YEAR=$(jq -r .year workshop_config.json)" >> $GITHUB_ENV
27+
echo "URL=$(jq -r .url workshop_config.json)" >> $GITHUB_ENV
28+
echo "DATES=$(jq -r .dates workshop_config.json)" >> $GITHUB_ENV
29+
echo "FACULTY=$(jq -r .faculty workshop_config.json)" >> $GITHUB_ENV
30+
31+
# Check the key variable and set a true/false output for the next steps
32+
if [[ "$(jq -r .workshop_code workshop_config.json)" == "Workshop Code (e.g. INR_Mon-2510)" ]]; then
33+
echo "is_configured=false" >> $GITHUB_OUTPUT
34+
echo "Configuration not complete. Halting."
35+
else
36+
echo "is_configured=true" >> $GITHUB_OUTPUT
37+
echo "Configuration complete. Proceeding with setup."
38+
fi
39+
40+
# --- CHANGE: All subsequent steps now check the output of the 'config' step ---
41+
- name: Rename .Rproj file
42+
if: steps.config.outputs.is_configured == 'true'
43+
run: mv template.Rproj "${{ env.WORKSHOP_CODE }}.Rproj"
44+
45+
- name: Replace All Placeholders
46+
if: steps.config.outputs.is_configured == 'true'
47+
run: |
48+
find . -type f -not -path './.git/*' -not -path './.github/*' -exec sed -i \
49+
-e "s|{{WORKSHOP_CODE}}|${WORKSHOP_CODE}|g" \
50+
-e "s|{{WORKSHOP_NAME}}|${WORKSHOP_NAME}|g" \
51+
-e "s|{{YEAR}}|${YEAR}|g" \
52+
-e "s|{{URL}}|${URL}|g" \
53+
-e "s|{{DATES}}|${DATES}|g" \
54+
-e "s|{{FACULTY}}|${FACULTY}|g" \
55+
{} +
56+
57+
- name: Clean up config file
58+
if: steps.config.outputs.is_configured == 'true'
59+
run: rm workshop_config.json
60+
61+
- name: Commit and Push Changes
62+
if: steps.config.outputs.is_configured == 'true'
63+
run: |
64+
git config --global user.name 'github-actions[bot]'
65+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
66+
git add .
67+
git commit --amend -m "feat: setup workshop with custom variables"
68+
git push --force

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata
5+
.DS_Store

001-faculty.Rmd

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Meet Your Faculty
2+
3+
<!--#### NAME
4+
5+
<img src="./img/faculty/MISSINGHEADSHOT.PNG" width="200" alt="Photo of NAME">
6+
7+
>JOB TITLE <br>
8+
INSTITUTION <br>
9+
LOCATION
10+
>
11+
> --- CONTACT INFO, IF PROVIDED
12+
13+
BIO GOES HERE-->
14+

002-computing.Rmd

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
IF YOUR WORKSHOP DOES NOT INCLUDE COMPUTE:
3+
- REMOVE "AND COMPUTE SETUP" FROM THE TOP-LEVEL HEADER
4+
- DELETE THE LAST SECTION (COMPUTE SETUP)
5+
6+
IF YOUR WORKSHOP INCLUDES COMPUTE:
7+
- AFTER THE WORKSHOP, ADD DATA DOWNLOAD LINKS, AWS MACHINE IMAGE INSTRUCTIONS, ETC.
8+
- IF IT IS MORE APPROPRIATE, YOU CAN INCLUDE THE DATA DOWNLOAD LINKS IN EACH OF THE MODULES.
9+
-->
10+
11+
# Data and Compute Setup
12+
13+
#### Course data downloads
14+
Coming soon!
15+
16+
#### Compute setup
17+
Coming soon!
18+
19+

010-module-1.Rmd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# (PART) Modules {-}
2+
3+
# Module 1
4+
5+
## Lecture
6+
7+
<!--<iframe width="640" height="360" src="YOUTUBE EMBED LINK" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
8+
-->
9+
10+
<!--<iframe src="GOOGLE SLIDES LINK/preview" width="640" height="480" allow="autoplay"></iframe>
11+
-->
12+
13+
## Lab

020-module-2.Rmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Module 2
2+
3+
## Lecture
4+
5+
6+
## Lab

030-module-3.Rmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Module 3
2+
3+
## Lecture
4+
5+
6+
## Lab

040-module-4.Rmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Module 4
2+
3+
## Lecture
4+
5+
6+
## Lab

0 commit comments

Comments
 (0)