Skip to content

Add 2024-10-23

Add 2024-10-23 #45

Workflow file for this run

name: Build and Deploy Quarto
permissions:
contents: write
pages: write
on:
push:
branches: [main]
# paths:
# - "day1_exercise_answers.qmd"
# - "day1_walkthrough_answers.qmd"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EMAIL: ${{ secrets.EMAIL }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Restore R package cache
uses: actions/cache@v4
with:
path: renv/cache
key: ${{ runner.os }}-r-${{ hashFiles('renv.lock') }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libxml2-dev libssl-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev
- name: Install dependencies with renv
run: Rscript -e 'renv::restore()'
- name: Install Quarto
run: |
wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.340/quarto-1.3.340-linux-amd64.deb
sudo dpkg -i quarto-1.3.340-linux-amd64.deb
- name: Create docs folder
run: mkdir -p docs
- name: Render Quarto files to HTML
run: |
quarto render day1_walkthrough_answers.qmd
quarto render day1_exercise_answers.qmd
quarto render day2_walkthrough_answers.qmd
quarto render day2_exercise_answers.qmd
quarto render day3_walkthrough_answers.qmd
quarto render day3_exercise_answers.qmd
quarto render day4_walkthrough_answers.qmd
# quarto render day4_exercise_answers.qmd
# Deploy HTML to GitHub Pages if on main or master branch
- name: Deploy to GitHub pages from main/master 🚀
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs
clean: false