Skip to content

Commit 2d7cd01

Browse files
committed
setup pkdown
1 parent f42e9be commit 2d7cd01

6 files changed

Lines changed: 58 additions & 25 deletions

File tree

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
^\.github$
66
^[\.]?air\.toml$
77
^\.vscode$
8+
^_pkgdown\.yml$
9+
^docs$
10+
^pkgdown$

.github/workflows/pkgdown.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
10+
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
14+
15+
jobs:
16+
pkgdown:
17+
runs-on: ubuntu-latest
18+
# Only restrict concurrency for non-PR jobs
19+
concurrency:
20+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
with:
32+
use-public-rspm: true
33+
34+
- uses: r-lib/actions/setup-r-dependencies@v2
35+
with:
36+
extra-packages: any::pkgdown, local::.
37+
needs: website
38+
39+
- name: Build site
40+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
41+
shell: Rscript {0}
42+
43+
- name: Deploy to GitHub pages 🚀
44+
if: github.event_name != 'pull_request'
45+
uses: JamesIves/github-pages-deploy-action@v4.5.0
46+
with:
47+
clean: false
48+
branch: gh-pages
49+
folder: docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.Rproj.user
22
inst/doc
3+
docs

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ Suggests:
2929
knitr,
3030
lintr
3131
VignetteBuilder: knitr
32+
URL: http://rladies.org/spellbind/

README.qmd

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,3 @@ You can install the development version of spellbind from [GitHub](https://githu
3030
# install.packages("pak")
3131
pak::pak("rladies/spellbind")
3232
```
33-
34-
## Example
35-
36-
This is a basic example which shows you how to solve a common problem:
37-
38-
```{r example}
39-
library(spellbind)
40-
## basic example code
41-
```
42-
43-
What is special about using `README.Rmd` instead of just `README.md`? You can include R chunks like so:
44-
45-
```{r cars}
46-
summary(cars)
47-
```
48-
49-
You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date. `devtools::build_readme()` is handy for this.
50-
51-
You can also embed plots, for example:
52-
53-
```{r pressure, echo = FALSE}
54-
plot(pressure)
55-
```
56-
57-
In that case, don't forget to commit and push the resulting figure files, so they display on GitHub and CRAN.

_pkgdown.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
url: http://rladies.org/spellbind/
2+
template:
3+
bootstrap: 5
4+

0 commit comments

Comments
 (0)