-
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (68 loc) · 1.56 KB
/
Copy pathdocs.yml
File metadata and controls
74 lines (68 loc) · 1.56 KB
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
69
70
71
72
73
74
---
name: Docs 📚
on:
push:
branches:
- main
paths:
- "_pkgdown.y[a]ml"
- DESCRIPTION
- "**.md"
- "**.Rmd"
- "man/**"
- "LICENSE.*"
- NAMESPACE
- "_quarto.yml"
- "index.qmd"
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
paths:
- "_pkgdown.y[a]ml"
- DESCRIPTION
- "**.md"
- "**.Rmd"
- "man/**"
- "LICENSE.*"
- NAMESPACE
- "_quarto.yml"
- "index.qmd"
workflow_dispatch:
jobs:
docs:
name: Quarto Docs 📕
runs-on: ubuntu-latest
container:
image: rocker/verse:4.4.0
permissions:
contents: write
steps:
- name: Check out repository 🛎️
uses: actions/checkout@v4.1.1
- name: Restore packages
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::install(c("rmarkdown", "yaml"))
renv::restore()
- name: Render Quarto Project 📑
run: quarto render --output-dir _site
shell: bash
- name: Upload Docs ⬆️
if: github.event_name != 'push'
uses: actions/upload-artifact@v4
with:
name: site
path: ./_site
- name: Publish Site 🗺️
if: github.event_name != 'pull_request'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
destination_dir: "."