-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 2 KB
/
deploy-quarto.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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