-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (42 loc) · 1.3 KB
/
publish.yaml
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
---
# Github Action Workflow to publish
# the Quarto website to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
name: Publish Site
env:
QUARTO_DIR: "."
jobs:
publish:
name: Build & Deploy
runs-on: ubuntu-latest
container:
image: ghcr.io/insightsengineering/rstudio:latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install CRAN dependencies
run: install.packages(c("pander", "glue", "geomtextpath"), repos = "https://cloud.r-project.org")
shell: Rscript {0}
- name: Install GitHub dependencies
run: remotes::install_github(c("coolbutuseless/poissoned", "coolbutuseless/minisvg", "coolbutuseless/svgpatternsimple"))
shell: Rscript {0}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
- name: Render Quarto Project
run: quarto render --output-dir _site
shell: bash
working-directory: ${{ env.QUARTO_DIR }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Project
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./${{ env.QUARTO_DIR }}/_site
destination_dir: ${{ env.QUARTO_DIR }}