Skip to content

Add R documentation previews for pull requests - #109

Closed
MLopez-Ibanez wants to merge 2 commits into
masterfrom
docs-preview-pr
Closed

MLopez-Ibanez wants to merge 2 commits into
masterfrom
docs-preview-pr

Conversation

@MLopez-Ibanez

Copy link
Copy Markdown
Owner

Summary

  • Build pkgdown documentation for pull requests with read-only repository permissions and upload it as a short-lived artifact.
  • Publish the artifact from a trusted workflow, validate it against the associated PR, and comment with an idempotent preview link.
  • Remove the corresponding gh-pages preview when a PR closes.

Validation

  • actionlint and YAML parsing pass for all changed workflows.
  • Artifact validation checks passed for the expected PR, mismatched PR, missing index, and symlink cases.
  • The pkgdown build could not be run locally because Rscript is not installed; it will run in GitHub Actions.

Fixes #108

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.48%. Comparing base (1a3ce12) to head (5d7a336).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #109   +/-   ##
=======================================
  Coverage   75.48%   75.48%           
=======================================
  Files          30       30           
  Lines        5120     5120           
=======================================
  Hits         3865     3865           
  Misses       1255     1255           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MLopez-Ibanez

Copy link
Copy Markdown
Owner Author

@copilot job pkgdown-preview duplicates a lot of code of job pkgdown. It would be better to keep pkgdown as it is but make the deploy or upload artifact steps conditional on whether it is a pull request or not.

Co-authored-by: MLopez-Ibanez <2620021+MLopez-Ibanez@users.noreply.github.com>

Copilot AI commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@copilot job pkgdown-preview duplicates a lot of code of job pkgdown. It would be better to keep pkgdown as it is but make the deploy or upload artifact steps conditional on whether it is a pull reque...

Consolidated the two build jobs into one read-only pkgdown job; artifact upload and deployment are now event-conditional, with deployment isolated to a write-scoped job. Commit: 06972fe.

@MLopez-Ibanez
MLopez-Ibanez deleted the docs-preview-pr branch October 31, 2026 18:11
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.

Preview R docs in pull requests

2 participants