I've created a pkgdown website for my package (cbib/Seurat-Integrate). It is perfectly rendered locally in the docs/ folder with pkgdown::build_site().
However, for a reason I cannot understand, the usethis::use_pkgdown_github_pages() creates an empty gh-pages branch.
The use_pkgdown_github_pages() command runs without error:
> usethis::use_pkgdown_github_pages()
! Overwrite pre-existing file _pkgdown.yml?
1: No
2: Negative
3: Yup
Selection: 2 # the answer doesn't seem to change the fact that the branch is empty
ℹ Leaving _pkgdown.yml unchanged.
☐ Modify _pkgdown.yml.
✔ GitHub Pages is publishing from:
• URL: "https://cbib.github.io/Seurat-Integrate/"
• Branch: "gh-pages"
• Path: "/"
✔ Saving "r-lib/actions/examples/pkgdown.yaml@v2" to .github/workflows/pkgdown.yaml.
☐ Learn more at <https://github.com/r-lib/actions/blob/v2/examples/README.md>.
✔ Recording <https://cbib.github.io/Seurat-Integrate/> as site's url in _pkgdown.yml.
☐ Run devtools::document() to update package-level documentation.
Then, a github action is initialized. It runs without errors, but given the elapsed time (17s for the build job), it probably doesn't do much.
And a gh-pages branch is created but it doesn't contain any file.
I don't know what could be the source of the problem. Here are some other remarks:
I have decided to put _pkgdown.yml in pkgdown/ because it worked fine with pkgdown::build_site() and some other packages with a functional pkgdown website did the same (e.g. tibble from the tidyverse) Locally, I copied it to the root of the package because usethis::use_pkgdown_github_pages() doesn't seem to look for it in pkgdown/ and replaced ~ with the correct url (see below).
_pkgdown.yml
url: https://cbib.github.io/Seurat-Integrate/
template:
bootstrap: 5
bslib:
font-size-root: 1rem
navbar:
structure:
left:
- intro
- reference
- articles
- memos
- tutorials
- news
right:
- search
- github
- lightswitch
components:
articles:
text: Articles
menu:
- text: 'Integration example: pbmcsca data'
href: articles/introduction.html
- text: Advice about conda and future
href: articles/setup_and_tips.html
memos:
icon: fa-sticky-note
aria-label: Aide-mémoires
menu:
- text: Integration methods
href: articles/memo_integration.html
- text: Scoring metrics
href: articles/memo_score.html
reference:
- title: Conda environment management
- subtitle: Modification interface
desc: |
Set, update, remove conda environments
contents:
- UpdateEnvCache
- resetCache
- saveToCache
- subtitle: Access interface
desc: |
Show the current state of environments or the location of cache on disk
contents:
- starts_with("getCache")
- reloadCache
- subtitle: Class constructors
contents:
- CondaEnv
- CondaManager
- subtitle: Checkers
desc: |
Check usability of conda environments
contents:
- isValid
- starts_with("checkConda")
- title: Data integration
- subtitle: Main interface
desc: |
Integrate the layers of a Seurat object with one or more methods
contents: DoIntegrate
- subtitle: Methods included in SeuratIntegrate
contents: ends_with("Integration")
- subtitle: Compatible methods from other packages
contents:
- Seurat::RPCAIntegration()
- Seurat::CCAIntegration()
- SeuratWrappers::FastMNNIntegration()
- title: Scoring
- subtitle: Preprocessing
desc: |
Useful functions to preprocess outputs before scoring
contents:
- FindOptimalClusters
- CellCycleScoringPerBatch
- subtitle: Scoring
desc: |
Functions to score integrations
contents: starts_with("AddScore")
- subtitle: Postprocessing
desc: |
Once `AddScore[..]` functions have been run, scores are to be scaled then plotted
contents:
- ScaleScores
- PlotScores
- subtitle: General getters and setters of score table
desc: |
Get, set, modify scores in a more flexible way
contents:
- IntegrationScores
- contains("Misc")
- title: Graph-based utilities
- subtitle: Graph manipulation
desc: |
Handy functions to manipulate and modify graphs
contents:
- SymmetrizeKnn
- CutKnn
- ExpandNeighbours
- GetConnectivities
- subtitle: Connectivity between batches
desc: |
Handy functions to overview inter- and intra-batches connections in a knn graph
contents: matches("^GetPropInt..Batch")
- title: Utility functions for matrices
desc: |
Functions designed for smaller-scale, auxiliary tasks on matrices.
- subtitle: Matrix normalisation
contents: NormaliseL2
- subtitle: Matrix sorting
contents:
- colSort
- rowSort
- colSorted
- rowSorted
- subtitle: Sparse matrix symmetry
contents: matches("^symmetrize.pm...sparse")
- subtitle: Matrix sorting
contents:
- colSort
- rowSort
- colSorted
- rowSorted
- subtitle: Conversion of matrix indices
contents:
- idx2col
- idx2row
- rowcol2idx
I don't want pkgdown to use the README as the index, so I created a index.md in pkgdown/
I had docs/ in .gitignore. I removed it locally and it didn't change anything. It is still in the GitHub repo however
In the GitHub repository, I have checked Settings > Pages, and it seems to be properly set
However, I didn't manage to publish the website with usethis::use_pkgdown_github_pages(), I used pkgdown::deploy_to_branch() instead.
I added the missing Remotes field in the DESCRIPTION file. But the step r-lib/actions/setup-r-dependencies@v2 failed: the package SeuratData fails to build on the GHA because the package vctrs is missing.
Is there a way to circumvent this problem? Since the vctrs package is part of my Imports, one way to fix this might be to force SeuratData to install after vctrs but I don't know how to do that.
Report a bug to them. The installation of the package fails on a fresh R system. I think it would be enough for them to depend on Seurat.
Until it is fixed, you can add another step to your workflow, that installs Seurat manually, either via setup-r-dependencies, or just by calling pak::pkg_install("Seurat").