Skip to content

chore(pkgdown): wire GH Actions deploy to gh-pages - #15

Merged
VincentGuyader merged 1 commit into
mainfrom
chore/pkgdown
May 15, 2026
Merged

chore(pkgdown): wire GH Actions deploy to gh-pages#15
VincentGuyader merged 1 commit into
mainfrom
chore/pkgdown

Conversation

@VincentGuyader

Copy link
Copy Markdown
Owner

Summary

Sets up pkgdown site generation and automated deployment to GitHub Pages via GitHub Actions.

Changes

  • _pkgdown.yml (new): site URL https://vincentguyader.github.io/shiny2docker/, Bootstrap 5 template.
  • .github/workflows/pkgdown.yaml (new): standard r-lib/actions setup; runs on push to main, on PRs (build only), on release, and on manual dispatch. Uses pkgdown::build_site_github_pages() then JamesIves/github-pages-deploy-action@v4.5.0 to push to the gh-pages branch (deploy step skipped on PRs).
  • .Rbuildignore: exclude _pkgdown.yml, docs/, pkgdown/ from the package tarball.
  • .gitignore: exclude /docs/ (site is deployed via Action, not committed to main).

After merge

Enable GitHub Pages in repo Settings -> Pages:

  • Source: Deploy from a branch
  • Branch: gh-pages
  • Folder: / (root)

The first push to main after merge triggers the workflow, creates the gh-pages branch, and publishes the site.

Local validation

  • pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) -> clean build, no URL warning, 12 pages + .nojekyll.
  • CI on this PR will exercise the build step (deploy step is skipped on PRs).

Test plan

  • Site builds locally with the same command the workflow uses.
  • After merge: first run on main creates gh-pages branch.
  • After GitHub Pages enablement: site reachable at the URL declared in _pkgdown.yml.

* 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 = /.
@VincentGuyader
VincentGuyader merged commit c98d26e into main May 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant