Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paulauvirage committed Sep 5, 2024
0 parents commit 1f86b2b
Show file tree
Hide file tree
Showing 141 changed files with 21,872 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
68 changes: 68 additions & 0 deletions .github/workflows/bookdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
# run every day at 11 PM
- cron: '0 23 * * *'
workflow_dispatch:

name: bookdown

jobs:
bookdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
isExtPR: ${{ github.event.pull_request.head.repo.fork == true }}
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2

- name: Cache bookdown results
uses: actions/cache@v3
with:
path: _bookdown_files
key: bookdown-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-

- name: Configure Git user
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
- name: Build site
run: bookdown::render_book("index.Rmd", quiet = TRUE)
shell: Rscript {0}

- name: Deploy to Netlify
if: contains(env.isExtPR, 'false')
id: netlify-deploy
uses: nwtgck/[email protected]
with:
publish-dir: './_book'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message:
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})'
# these all default to 'true'
enable-pull-request-comment: false
enable-commit-comment: false
# enable-commit-status: true
#o verwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.Rproj.user
.Rhistory
.RData
README.html
_book
_bookdown_files
render-r-script-demo.html
happygitwithr.rds
.netlify
.Rbuildignore
img/github-configs
.Rdata
.httr-oauth
.DS_Store
.quarto
21 changes: 21 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Package: happygitwithr
Title: Happy Git and GitHub for the useR
Version: 0.1
Authors@R:
person("Jennifer", "Bryan", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-6983-2759"))
Description: This is not a package, but we just use this file to declare
the dependencies of the site.
URL: https://happygitwithr.com
Imports:
bookdown,
bslib,
downlit (>= 0.4.1.9000),
fs,
glue,
readr,
sessioninfo,
xml2
Encoding: UTF-8
Remotes:
r-lib/downlit
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Rendered product: <https://happygitwithr.com>

<!-- badges: start -->
[![bookdown](https://github.com/jennybc/happy-git-with-r/actions/workflows/bookdown.yaml/badge.svg)](https://github.com/jennybc/happy-git-with-r/actions/workflows/bookdown.yaml)
[![Netlify Status](https://api.netlify.com/api/v1/badges/4e9fea2e-d99c-484e-be1a-9d8605393f4e/deploy-status)](https://app.netlify.com/sites/happygitwithr/deploys)
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" height = 20 /></a>
<!-- badges: end -->
74 changes: 74 additions & 0 deletions _bookdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
book_filename: "happygitwithr"
language:
ui:
chapter_name: "Chapter "
delete_merged_file: true
new_session: true

rmd_files: [
"index.Rmd",

"overview.Rmd",
"contributors.Rmd",
"workshops.Rmd",

"install-intro.Rmd",
"install-github-acct.Rmd",
"install-r-rstudio.Rmd",
"install-git.Rmd",
"install-introduce-self-git.Rmd",
"install-git-client.Rmd",

"connect-intro.Rmd",
"connect-https-pat.Rmd",
"connect-ssh-keys.Rmd",
"connect-git-github.Rmd",
"connect-rstudio-git-github.Rmd",
"connect-can-rstudio-use-git.Rmd",
"connect-troubleshooting.Rmd",

"usage-intro.Rmd",
"usage-new-project-github-first.Rmd",
"usage-existing-project-github-first.Rmd",
"usage-existing-project-github-last.Rmd",
"usage-rmd-and-github.Rmd",
"usage-r-script-and-github.Rmd",

"git-intro.Rmd",
"git-basics.Rmd",
"git-commands.Rmd",
"git-branches.Rmd",
"git-remotes.Rmd",
"git-refs.Rmd",

"remote-setups-intro.Rmd",
"remote-setups-common.Rmd",
"remote-setups-equivocal.Rmd",

"workflows-intro.Rmd",
"workflows-repeated-amend.Rmd",
"workflows-push-rejected.Rmd",
"workflows-pull.Rmd",
"workflows-see-the-past.Rmd",
"workflows-fork-and-clone.Rmd",
"workflows-upstream-changes-into-fork.Rmd",
"workflows-explore-extend-pull-request.Rmd",
"workflows-make-github-repo-browsable.Rmd",

"prompt-clone.Rmd",
"prompt-fork-pr-bingo.Rmd",
"prompt-burn-it-all-down.Rmd",
"prompt-practice-resets.Rmd",
"prompt-search-github.Rmd",

"notes-intro.Rmd",
"notes-classroom-overview.Rmd",
"notes-ideas.Rmd",
"notes-bookdown-cheat-sheet.Rmd",

"appendix.Rmd",
"shell.Rmd",
"comic-relief.Rmd",

"references.Rmd"
]
26 changes: 26 additions & 0 deletions _output.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
bookdown::bs4_book:
theme:
primary: "#4D6F8D"
repo:
base: https://github.com/jennybc/happy-git-with-r
branch: main
includes:
in_header: [ga_script.html]
bookdown::gitbook:
includes:
in_header: [ga_script.html]
css: style.css
split_bib: FALSE
config:
sharing:
github: yes
facebook: false
twitter: false
download: false
toc:
collapse: section
before: |
<li><a href="./">Happy Git and GitHub for the useR</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit: https://github.com/jennybc/happy-git-with-r/edit/main/%s
1 change: 1 addition & 0 deletions appendix.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# (APPENDIX) Appendix {-}
Loading

0 comments on commit 1f86b2b

Please sign in to comment.