Skip to content

Commit b8182a8

Browse files
committed
add github pages support
1 parent 3a35a74 commit b8182a8

File tree

5 files changed

+57
-3
lines changed

5 files changed

+57
-3
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
^inst/hex.R$
99
README.Rmd
1010
^doc$
11+
^\.github$

.github/.gitignore

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

.github/workflows/pkgdown.yaml

+49
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

DESCRIPTION

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Suggests:
4646
testthat (>= 3.0.0),
4747
xml2
4848
License: MPL-2.0
49+
URL: https://galaxias.ala.org.au
4950
BugReports: https://github.com/AtlasOfLivingAustralia/galaxias/issues
5051
Maintainer: Martin Westgate <martin.westgate@csiro.au>
5152
Encoding: UTF-8

_pkgdown.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
url: https://galaxias.ala.org.au
12
template:
23
bootstrap: 5
34
bslib:
4-
code_font: {google: "Source Code Pro"}
5+
code_font:
6+
google: Source Code Pro
57
params:
68
bootswatch: cerulean
79
development:
@@ -30,8 +32,7 @@ navbar:
3032
href: news/index.html
3133
reference:
3234
- title: Set up a project
33-
contents:
34-
- galaxias_project
35+
contents: galaxias_project
3536
- title: Construct an archive
3637
contents:
3738
- build_metadata
@@ -43,3 +44,4 @@ reference:
4344
- galaxias_config
4445
- validate_archive
4546
- print_validation
47+

0 commit comments

Comments
 (0)