Skip to content

Commit a97c862

Browse files
committed
Host package docs on Github Pages.
1 parent 8e01b1b commit a97c862

4 files changed

Lines changed: 82 additions & 0 deletions

File tree

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
^LICENSE\.md$
22
Makefile
3+
^_pkgdown\.yml$
4+
^\.github$
5+
^docs$

.github/workflows/pkgdown.yml

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

DESCRIPTION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Suggests:
2727
knitr,
2828
rmarkdown,
2929
testthat (>= 3.0.0)
30+
URL: https://henryspatialanalysis.github.io/versioning/, https://github.com/henryspatialanalysis/versioning
31+
BugReports: https://github.com/henryspatialanalysis/versioning/issues
3032
License: MIT + file LICENSE
3133
Encoding: UTF-8
3234
Roxygen: list(markdown = TRUE)

_pkgdown.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
url: https://henryspatialanalysis.github.io/versioning/
2+
3+
home:
4+
title: versioning
5+
6+
navbar:
7+
structure:
8+
left: [intro, reference, articles, news]
9+
right: [github]
10+
components:
11+
github:
12+
icon: fab fa-github
13+
href: https://github.com/henryspatialanalysis/versioning
14+
15+
reference:
16+
- title: "Config object"
17+
desc: "R6 class for versioned file I/O driven by a YAML configuration file"
18+
contents:
19+
- Config
20+
21+
- title: "Auto read/write"
22+
desc: "Read and write files automatically based on their extension"
23+
contents:
24+
- autoread
25+
- autowrite
26+
- get_file_reading_functions
27+
- get_file_writing_functions
28+
29+
- title: "Utilities"
30+
desc: "Lower-level helpers used internally"
31+
contents:
32+
- pull_from_list

0 commit comments

Comments
 (0)