Skip to content

Commit

Permalink
add actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Susan Vanderplas committed Aug 8, 2024
1 parent a89f4a0 commit fcae53d
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
on:
schedule:
- cron: "0 0 * * 5"
push:
branches: main

name: Render and Publish

# you need these permissions to publish to GitHub pages
# permissions:
# contents: write
# pages: write

jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.PAT_TOKEN }}

# https://jasonraimondi.com/posts/install-google-fonts-in-github-workflow/
- name: Install Google Fonts
run: |
wget -O Noto_Sans.zip https://fonts.google.com/download?family=Noto%20Sans
unzip -d Noto_Sans/ Noto_Sans.zip
mv Noto_Sans /usr/share/fonts/
fc-cache -fv
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: true

# add software dependencies here and any libraries

# From https://github.com/r-lib/actions/tree/v2-branch/setup-r
- name: Setup R
uses: r-lib/actions/setup-r@v2

# See more at https://github.com/quarto-dev/quarto-actions/blob/main/examples/example-03-dependencies.md

- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
any::rmarkdown
any::downlit
any::knitr
any::skimr
any::ggplot2
any::ggthemes
any::devtools
any::jsonlite
any::yaml
any::lubridate
any::stringr
any::dplyr
any::tidyr
any::purrr
any::readr
any::xml2

# NOTE: If Publishing to GitHub Pages, set the permissions correctly
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2

- name: Publish to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
run: |
git config --global user.email "[email protected]"
git config --global user.name "Auto Build 251 Site"
quarto publish gh-pages docs --no-render --no-browser

0 comments on commit fcae53d

Please sign in to comment.