Skip to content

fix(pkgdown): Fix url to the MSstatsPTM github page#128

Merged
tonywu1999 merged 3 commits intodevelfrom
fix-pkgdown
Apr 9, 2026
Merged

fix(pkgdown): Fix url to the MSstatsPTM github page#128
tonywu1999 merged 3 commits intodevelfrom
fix-pkgdown

Conversation

@tonywu1999
Copy link
Copy Markdown
Contributor

@tonywu1999 tonywu1999 commented Apr 9, 2026

Motivation and Context

The repository's pkgdown configuration URL pointed incorrectly; there was also no automated workflow to build and publish the pkgdown site. This PR fixes the pkgdown site URL and adds a GitHub Actions workflow to build the site and (when appropriate) deploy it to GitHub Pages so the project's documentation is built automatically and hosted at the correct URL.

Solution summary

  • Add a pkgdown configuration file with the correct GitHub Pages URL.
  • Add a GitHub Actions workflow to build the pkgdown site on devel and to publish to gh-pages (deployment skipped for PRs).

Detailed Changes

  • Added .github/workflows/pkgdown.yaml
    • New workflow named "pkgdown" triggered on pushes to devel, pull requests targeting devel, and manual dispatch.
    • Job runs on ubuntu-latest.
    • Installs Pandoc and sets up R with public package manager support.
    • Installs R dependencies including pkgdown and the local package with the website component.
    • Builds the site via pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE).
    • Deploys docs to gh-pages using JamesIves/github-pages-deploy-action; deployment is skipped on pull requests.
    • Sets concurrency and uses secrets.GITHUB_TOKEN for the PAT environment variable.
  • Added _pkgdown.yml
    • Sets site URL to https://vitek-lab.github.io/MSstatsPTM/.
    • Sets pkgdown template Bootstrap version to 5.
  • Commit metadata
    • Single commit message: "new line to pkgdown" (indicative of a small change).

Unit Tests

  • No unit tests were added or modified. Changes are limited to CI/CD workflow and documentation configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow and a pkgdown configuration to build the pkgdown site on pushes/PRs (and manual dispatch) targeting devel, then deploy the generated docs to gh-pages; workflow installs R, dependencies (including pkgdown), builds the site, and deploys via a deploy action.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/pkgdown.yaml
New workflow triggered on pushes, pull requests, and manual dispatch to devel; checks out code, installs Pandoc, sets up R, installs package deps and pkgdown, builds the site with pkgdown::build_site_github_pages(...), and deploys docs to gh-pages (skips deploy on PRs).
Pkgdown Configuration
_pkgdown.yml
New pkgdown config setting site url to https://vitek-lab.github.io/MSstatsPTM/ and template Bootstrap version 5.

Sequence Diagram(s)

sequenceDiagram
    rect rgba(220,240,255,0.5)
    participant GitHub as GitHub (push/PR/dispatch)
    end
    rect rgba(200,255,220,0.5)
    participant Actions as GitHub Actions Workflow
    end
    rect rgba(255,245,200,0.5)
    participant Runner as Runner (ubuntu-latest)
    end
    rect rgba(255,220,230,0.5)
    participant Pages as GitHub Pages (gh-pages)
    end

    GitHub->>Actions: trigger workflow
    Actions->>Runner: start job (pkgdown)
    Runner->>Runner: checkout repo
    Runner->>Runner: install Pandoc
    Runner->>Runner: setup R + install deps (including pkgdown, local::.)
    Runner->>Runner: build pkgdown site (docs/)
    Runner->>Pages: deploy `docs` to `gh-pages` (via deploy action)
    Pages-->>GitHub: site updated
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I stitched a workflow, line by line,
Docs will bloom and pages shine,
R boots up, the site takes flight,
Gh-pages waits to show it right,
hop hop — deployed tonight ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is missing entirely. While the PR has a title referencing pkgdown URL fix, no description template sections were completed by the author. Complete the PR description following the template: add motivation/context explaining the pkgdown URL issue, provide a detailed bullet-point list of changes, describe any testing performed, and check the appropriate checklist items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing the pkgdown URL configuration for the MSstatsPTM GitHub page, which aligns with the added/modified pkgdown files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-pkgdown

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/pkgdown.yaml:
- Around line 25-45: The workflow pins GitHub Actions to mutable tags; replace
each `uses:` entry's version tag with the corresponding 40-character commit SHA
to harden supply-chain integrity: update `actions/checkout@v4`,
`r-lib/actions/setup-pandoc@v2`, `r-lib/actions/setup-r@v2`,
`r-lib/actions/setup-r-dependencies@v2`, and
`JamesIves/github-pages-deploy-action@v4.5.0` to their full commit SHAs (locate
the exact `uses:` lines in the file and swap the `@<tag>` suffix for
`@<full-commit-sha>`). Ensure you verify the correct SHA from each action's
GitHub repository and commit the updated workflow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c6ea6e2b-715b-449e-8b02-117b9cabab09

📥 Commits

Reviewing files that changed from the base of the PR and between c2f697d and ad1df5e.

📒 Files selected for processing (2)
  • .github/workflows/pkgdown.yaml
  • _pkgdown.yml

Comment on lines +25 to +45
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify workflow actions that are not pinned to full commit SHAs.
# Expected: no output after hardening.
rg -nP '^\s*-\s*uses:\s*[^@\s]+@(?!(?:[0-9a-f]{40})\s*$).+' .github/workflows

Repository: Vitek-Lab/MSstatsPTM

Length of output: 368


🏁 Script executed:

cat -n .github/workflows/pkgdown.yaml

Repository: Vitek-Lab/MSstatsPTM

Length of output: 1676


Pin all GitHub Actions to immutable commit SHAs.

All five uses: statements in this workflow (lines 25, 27, 29, 33, and 44) are pinned to mutable version tags (@v4, @v2, @v4.5.0) rather than full commit SHAs. This weakens supply-chain integrity by allowing tag reassignment attacks. Replace each tag with its corresponding 40-character commit SHA:

  • actions/checkout@v4actions/checkout@<SHA>
  • r-lib/actions/setup-pandoc@v2r-lib/actions/setup-pandoc@<SHA>
  • r-lib/actions/setup-r@v2r-lib/actions/setup-r@<SHA>
  • r-lib/actions/setup-r-dependencies@v2r-lib/actions/setup-r-dependencies@<SHA>
  • JamesIves/github-pages-deploy-action@v4.5.0JamesIves/github-pages-deploy-action@<SHA>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pkgdown.yaml around lines 25 - 45, The workflow pins
GitHub Actions to mutable tags; replace each `uses:` entry's version tag with
the corresponding 40-character commit SHA to harden supply-chain integrity:
update `actions/checkout@v4`, `r-lib/actions/setup-pandoc@v2`,
`r-lib/actions/setup-r@v2`, `r-lib/actions/setup-r-dependencies@v2`, and
`JamesIves/github-pages-deploy-action@v4.5.0` to their full commit SHAs (locate
the exact `uses:` lines in the file and swap the `@<tag>` suffix for
`@<full-commit-sha>`). Ensure you verify the correct SHA from each action's
GitHub repository and commit the updated workflow.

@tonywu1999 tonywu1999 merged commit e27ceea into devel Apr 9, 2026
3 checks passed
@tonywu1999 tonywu1999 deleted the fix-pkgdown branch April 9, 2026 15:12
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