Skip to content

Commit

Permalink
Use shared workflows. (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthegeek authored Nov 14, 2024
1 parent 0cc1582 commit 07abe81
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 70 deletions.
43 changes: 1 addition & 42 deletions .github/workflows/deploy_bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,6 @@ on:
- 'README.md'
workflow_dispatch:

name: renderbook

jobs:
bookdown:
name: Render-Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2

- name: Render Book
run: Rscript -e 'bookdown::render_book("index.Rmd")'
- uses: actions/upload-artifact@main
with:
name: _book
path: _book/

# Need to first create an empty gh-pages branch
# see https://pkgdown.r-lib.org/reference/deploy_site_github.html
# and also add secrets for a GH_PAT and EMAIL to the repository
# gh-action from Cecilapp/GitHub-Pages-deploy
checkout-and-deploy:
runs-on: ubuntu-latest
needs: bookdown
steps:
- name: Checkout
uses: actions/checkout@main
- name: Download artifact
uses: actions/[email protected]
with:
# Artifact name
name: _book # optional
# Destination path
path: _book # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v2
env:
EMAIL: ${{ secrets.EMAIL }} # must be a verified email
GH_TOKEN: ${{ secrets.GH_PAT }} # https://github.com/settings/tokens
BUILD_DIR: _book/ # "_site/" by default
uses: r4ds/r4dsactions/.github/workflows/render_pages.yml@main
15 changes: 2 additions & 13 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: pr_check
on:
pull_request:
branches: main
Expand All @@ -7,15 +6,5 @@ on:
workflow_dispatch:

jobs:
bookdown:
name: pr_check_book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
- name: Render Book
run: Rscript -e 'bookdown::render_book("index.Rmd")'
pr_check:
uses: r4ds/r4dsactions/.github/workflows/render_check.yml@main
8 changes: 2 additions & 6 deletions .github/workflows/pr_check_readme.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: pr_check
on:
pull_request:
branches: main
Expand All @@ -7,8 +6,5 @@ on:
workflow_dispatch:

jobs:
bookdown:
name: pr_check_book
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required" '
pr_check:
uses: r4ds/r4dsactions/.github/workflows/render_check_readme.yml@main
1 change: 1 addition & 0 deletions _bookdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
book_filename: "bookclub-ggplot2_01"
repo: "https://github.com/r4ds/bookclub-ggplot2"
edit: "https://github.com/r4ds/bookclub-ggplot2/edit/main/%s"
output_dir: "_book"
delete_merged_file: true
language:
Expand Down
104 changes: 95 additions & 9 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,108 @@ bibliography: book.bib
biblio-style: apalike
link-citations: yes
github-repo: r4ds/bookclub-ggplot2
description: "This is the product of the Data Science Learning Community's Book Club."
description: "This is the product of the Data Science Learning Community's ggplot2 Book Club."
---

# Welcome {-}

This is a companion for the book [ggplot2: Elegant Graphics for Data Analysis](https://ggplot2-book.org/index.html) by Hadley Wickham, Danielle Navarro, and Thomas Lin Pedersen.
This companion is available at [https://r4ds.github.io/bookclub-ggplot2](https://r4ds.github.io/bookclub-ggplot2).

This website is being developed by the [Data Science Learning Community](https://dslc.io). Follow along, and [join the community](https://dslc.io/join) to participate.

This companion follows the [Data Science Learning Community Code of Conduct](https://dslc.io/conduct).
- These are **shared slides!**
- Developed by the [Data Science Learning Community](https://dslc.io).
- [Join the community](https://dslc.io/join) to participate.
- Available at [dslc.io/ggplot2](https://dslc.io/ggplot2).
- We follow the [Data Science Learning Community Code of Conduct](https://dslc.io/conduct).

## Book club meetings {-}

- Each week, a volunteer will present a chapter from the book.
- **This is the best way to learn the material.**
- Presentations will usually consist of a review of the material, a discussion, and/or a demonstration of the principles presented in that chapter.
- More information about how to present is available in the [github repo](https://github.com/r4ds/bookclub-ggplot2).
- Presentations will be recorded, and will be available on the [Data Science Learning Community YouTube Channel](https://dslc.io/youtube).
- Volunteer leads discussion of a chapter (spreadsheet link in channel)
- **This is the best way to learn the material.**
- Presentations:
- Review of material
- Questions you have
- Maybe live demo
- More info about editing: [this github repo](https://github.com/r4ds/bookclub-ggplot2).
- Recorded, available on the [DSLC.video Community YouTube Channel](https://dslc.video).
- **Camera** is **optional,** but **encouraged.**

## Pace {-}

- Meet ***every*** week except holidays, etc
- We'll discuss even if presenter unavailable
- Meetings = **1 hour.**
- **Goal:** 1 chapter/week
- Ok to split overwhelming chapters
- Ok to combine short chapters
- If we need to **slow down** and discuss, **let me know.**
- Most likely someone has the same question
- We are all here to learn

## Introductions {-}

If you feel comfortable sharing, unmute or raise your hand!

- **Who** are you?
- **Where** are you joining from?
- **Previous clubs?** (DSLC or other)
- **How long** have you been using R?
- **What** are you most looking forward to learning?

## git and GitHub {-}

- **Git/GitHub** (version control) = **valuable skill.**
- Discussed more in **Chapter 21.**
- If you present, best to **integrate your materials** into this bookdown version.
- You'll need a **GitHub account** to submit modifications.
- **Full instructions** in [GitHub repository](https://github.com/r4ds/bookclub-ggplot2) ("repo").

## Group Question 1 {-}

(Submit answers in chat)

On a scale from 1 - 5, how familiar are you with using git for version control?

1 = Not at all familiar (a true beginner)

to

5 = Very familiar (use git everyday/can handle a merge conflict like a pro)

## Group Question 2 {-}

(Submit answers in chat)

On a scale from 1 - 5, how familiar are you with using GitHub?

1 = Not at all familiar (a true beginner)

to

5 = Very familiar (I have GitHub account with repositories)

## Group Question 3 {-}

(Submit answers in chat)

On a scale from 1 - 5, how valuable would it be to devote a week to introducing git and GitHub?

1 = Not at all valuable

to

5 = Very valuable

## git and GitHub Resources {-}

- [Happy Git and GitHub for the useR](https://happygitwithr.com/)
- [`usethis`'s pull request helpers](https://usethis.r-lib.org/articles/pr-functions.html)
- [`git`'s documentation](https://git-scm.com/doc)
- [MShiny Cohort 2 Introduction](https://www.youtube.com/watch?v=beOYuHG9Xng&list=PL3x6DOfs2NGjhwrYvdmrKRNcvXX7X6ldt)

## Learning objectives {-}

- Students who study with LOs in mind ***retain more.***
- **Tips:**
- "After today's session, you will be able to..."
- *Very* roughly **1 per section.**

0 comments on commit 07abe81

Please sign in to comment.