Skip to content

Add pkgdown configuration and update GitHub Actions for deployment #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ model_glm_dirichlet_multinomial_imputation.rds
^Meta$
sccomp_draws_files

^_pkgdown\.yml$
^docs$
^pkgdown$
27 changes: 8 additions & 19 deletions .github/workflows/workflow_with_cmdstanr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,15 @@ jobs:
- name: Build pkgdown site
shell: Rscript {0}
run: |
pkgdown::build_site()
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request' || github.head_ref == 'fix-github-pages'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
path: ./docs

# Deploy job
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
clean: false
branch: gh-pages
folder: docs
Comment on lines +133 to +138
Copy link
Preview

Copilot AI Jul 20, 2025

Choose a reason for hiding this comment

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

The hardcoded branch name 'fix-github-pages' in the conditional makes the workflow fragile. Consider using a more generic approach or removing this specific branch exception to avoid maintenance issues when branch names change.

Copilot uses AI. Check for mistakes.


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ Rplot.pdf
/Meta/
sccomp_draws_files
.DS_Store
docs
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ SystemRequirements: CmdStan (https://mc-stan.org/users/interfaces/cmdstan), C++1
biocViews: Bayesian, Regression, DifferentialExpression, SingleCell, Metagenomics, FlowCytometry, Spatial
LazyData: true
VignetteBuilder: knitr
URL: https://github.com/MangiolaLaboratory/sccomp
URL: https://github.com/MangiolaLaboratory/sccomp, https://mangiolalaboratory.github.io/sccomp/
BugReports: https://github.com/MangiolaLaboratory/sccomp/issues
Config/testthat/edition: 3
Config/testthat/parallel: true
Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://mangiolalaboratory.github.io/sccomp/
template:
bootstrap: 5

Loading