Skip to content

Commit c98d26e

Browse files
chore(pkgdown): wire GH Actions deploy to gh-pages (#15)
* Add _pkgdown.yml with site URL (https://vincentguyader.github.io/shiny2docker/) and bootstrap 5 template. * Add .github/workflows/pkgdown.yaml: build on push to main / PR / release, deploy to gh-pages via JamesIves/github-pages-deploy-action. * Rbuildignore: exclude _pkgdown.yml, docs/, pkgdown/. * gitignore: exclude /docs/ (generated, deployed via Action, not committed). After first run on main, enable GitHub Pages in repo settings: Source = "Deploy from a branch", Branch = gh-pages, Folder = /.
1 parent 420edfb commit c98d26e

4 files changed

Lines changed: 52 additions & 0 deletions

File tree

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
^CRAN-SUBMISSION$
1212
^doc$
1313
^Meta$
14+
^_pkgdown\.yml$
15+
^docs$
16+
^pkgdown$

.github/workflows/pkgdown.yaml

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
inst/doc
66
/doc/
77
/Meta/
8+
/docs/

_pkgdown.yml

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

0 commit comments

Comments
 (0)