Skip to content

Commit b2f050e

Browse files
author
Wright
committed
Add pkgdown documentation website
1 parent 12f1e1e commit b2f050e

File tree

6 files changed

+59
-0
lines changed

6 files changed

+59
-0
lines changed

.Rbuildignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
^.*\.Rproj$
22
^\.Rproj\.user$
3+
^_pkgdown\.yml$
4+
^docs$
5+
^pkgdown$
6+
^\.github$

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/pkgdown.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown
13+
14+
jobs:
15+
pkgdown:
16+
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20+
env:
21+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- uses: r-lib/actions/setup-pandoc@v2
28+
29+
- uses: r-lib/actions/setup-r@v2
30+
with:
31+
use-public-rspm: true
32+
33+
- uses: r-lib/actions/setup-r-dependencies@v2
34+
with:
35+
extra-packages: any::pkgdown, local::.
36+
needs: website
37+
38+
- name: Build site
39+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
40+
shell: Rscript {0}
41+
42+
- name: Deploy to GitHub pages 🚀
43+
if: github.event_name != 'pull_request'
44+
uses: JamesIves/github-pages-deploy-action@v4.4.1
45+
with:
46+
clean: false
47+
branch: gh-pages
48+
folder: docs

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.Rhistory
33
.RData
44
.Ruserdata
5+
docs

DESCRIPTION

+1
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ Imports:
2525
tidyxl
2626
Roxygen: list(markdown = TRUE)
2727
RoxygenNote: 7.2.1
28+
URL: https://nationalparkservice.github.io/imd-ccal/

_pkgdown.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
url: https://nationalparkservice.github.io/imd-ccal/
2+
template:
3+
bootstrap: 5
4+

0 commit comments

Comments
 (0)