Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgohel committed Dec 5, 2024
0 parents commit 133f073
Show file tree
Hide file tree
Showing 59 changed files with 3,724 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build_book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Deploy Course

on:
push:
branches:
- main
- test

env:
QUARTO_LOG_LEVEL: DEBUG

jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
CRAN: "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
GITHUB_PAT: ${{ secrets.PAT }}
if: "contains(github.event.head_commit.message, 'deploy: {')"

steps:
- uses: actions/checkout@v3

- name: Setup R
uses: r-lib/actions/setup-r@v2

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

- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true

- name: Install R Packages
run: |
install.packages("pak", repos = Sys.getenv("CRAN"))
pak::pak(c("arrow", "cluster", "dplyr", "flextable", "formatters", "gdtools", "gfonts", "ggforce", "ggplot2", "grid", "magick", "officer", "palmerpenguins", "patchwork", "ragg", "readxl", "rmarkdown", "scales", "stringr", "systemfonts", "tables", "tibble", "tidyverse", "yaml", "remotes", "tinytex", "quarto", "knitr", "htmltools", "here", "renv"))
shell: Rscript {0}

- name: Generate books
run: |
quarto::quarto_render(input = ".", as_job = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_book
destination_dir: "."
keep_files: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.quarto/
_book
.Rproj.user
.Rhistory
.RData
.Ruserdata
Loading

0 comments on commit 133f073

Please sign in to comment.