Skip to content

Commit fbb41e2

Browse files
committed
Set up pkgdown
1 parent 59ff0e7 commit fbb41e2

5 files changed

Lines changed: 57 additions & 1 deletion

File tree

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
^\.github$
22
^.*\.Rproj$
33
^\.Rproj\.user$
4+
^_pkgdown\.yml$
5+
^docs$
6+
^pkgdown$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/pkgdown.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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@v6
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
32+
- uses: r-lib/actions/setup-r-dependencies@v2
33+
with:
34+
extra-packages: any::pkgdown, local::.
35+
needs: website
36+
37+
- name: Build site
38+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
39+
shell: Rscript {0}
40+
41+
- name: Deploy to GitHub pages 🚀
42+
if: github.event_name != 'pull_request'
43+
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
44+
with:
45+
clean: false
46+
branch: gh-pages
47+
folder: docs

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.Rhistory
33
.RData
44
.Ruserdata
5-
*.Rproj
5+
*.Rproj
6+
docs

_pkgdown.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
url: https://HelenaLC.github.io/SpatialData.plot
2+
template:
3+
bootstrap: 5
4+

0 commit comments

Comments
 (0)