Skip to content

Commit c36189a

Browse files
authored
Initial commit
0 parents  commit c36189a

12 files changed

+902
-0
lines changed

.devcontainer/devcontainer.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Config options: https://github.com/rocker-org/devcontainer-templates/tree/main/src/r-ver
2+
{
3+
"name": "R (rocker/r-ver base)",
4+
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4.3",
5+
6+
// Add software
7+
"features": {
8+
// R package config: https://github.com/rocker-org/devcontainer-features/blob/main/src/r-packages/README.md
9+
"ghcr.io/rocker-org/devcontainer-features/r-packages:1": {
10+
"packages": "cli,rlang",
11+
"installSystemRequirements": true
12+
},
13+
// Quarto configuration : https://github.com/rocker-org/devcontainer-features/blob/main/src/quarto-cli/README.md
14+
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
15+
"installTinyTex": true,
16+
"version": "prerelease"
17+
}
18+
},
19+
"customizations": {
20+
"vscode": {
21+
"extensions": [
22+
"quarto.quarto",
23+
"peakchen90.open-html-in-browser"
24+
]
25+
}
26+
}
27+
}

.github/workflows/quarto-render.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
on:
2+
workflow_dispatch:
3+
pull_request:
4+
branches: [main, master]
5+
push:
6+
# only trigger on main/master branches, not on tags
7+
branches: [main, master]
8+
9+
name: quarto-render
10+
jobs:
11+
quarto-linux:
12+
runs-on: ubuntu-latest
13+
env:
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
steps:
16+
# Obtain a copy of the repository on the runner
17+
- name: Check out repository
18+
uses: actions/checkout@v3
19+
20+
# Install Quarto
21+
- name: Set up Quarto
22+
uses: quarto-dev/quarto-actions/setup@v2
23+
with:
24+
# To install LaTeX to build PDF book
25+
tinytex: true
26+
27+
# Setup pandoc (might be included with Quarto action?)
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
# Setup R
30+
- uses: r-lib/actions/setup-r@v2
31+
with:
32+
use-public-rspm: true
33+
34+
# Handle installing R packages from DESCRIPTION file
35+
- uses: r-lib/actions/setup-r-dependencies@v2
36+
# with:
37+
# extra-packages: any::ggplot2, local::.
38+
39+
# Download latest version of Python
40+
- uses: actions/setup-python@v4
41+
with:
42+
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
43+
cache: 'pip'
44+
45+
# Install jupyter via pip if it is not part of your requirements.txt
46+
# - name: "Install Jupyter Notebooks via Pip"
47+
# run: |
48+
# pip install jupyter
49+
50+
# Install python dependencies from requirements via pip
51+
- name: "Install Python dependencies via Pip"
52+
run: |
53+
pip install -r requirements.txt
54+
55+
# Render the Quarto book using GitHub actions and publish
56+
# We are using the built-in {{GITHUB_PAT}} environment variable.
57+
- name: Publish to GitHub Pages (and render)
58+
uses: quarto-dev/quarto-actions/publish@v2
59+
with:
60+
target: gh-pages
61+
#path: _book
62+

.gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# History files
2+
.Rhistory
3+
.Rapp.history
4+
5+
# Session Data files
6+
.RData
7+
8+
# User-specific files
9+
.Ruserdata
10+
11+
# Example code in package build process
12+
*-Ex.R
13+
14+
# Output files from R CMD build
15+
/*.tar.gz
16+
17+
# Output files from R CMD check
18+
/*.Rcheck/
19+
20+
# RStudio files
21+
.Rproj.user/
22+
23+
# produced vignettes
24+
vignettes/*.html
25+
vignettes/*.pdf
26+
27+
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
28+
.httr-oauth
29+
30+
# knitr and R markdown default cache directories
31+
*_cache/
32+
/cache/
33+
34+
# Temporary files created by R markdown
35+
*.utf8.md
36+
*.knit.md
37+
38+
# R Environment Variables
39+
.Renviron

DESCRIPTION

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Package: mybook
2+
Title: Name of Course Textbook
3+
Version: 0.1.0
4+
Authors@R: c(person("James Joseph", "Balamuta", "balamut2@illinois.edu", c("aut", "cre", "cph")))
5+
Depends: R (>= 4.0)
6+
URL: https://github.com/coatless-tutorials/quarto-book-template
7+
Imports:
8+
rmarkdown,
9+
reticulate

0 commit comments

Comments
 (0)