add glmGamPoi package #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Workflow for building and deploying pkgdown site | |
| # Uses renv for reproducible package versions | |
| # | |
| # Last updated: 2025-01-14 | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| name: pkgdown | |
| permissions: read-all | |
| jobs: | |
| pkgdown: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| RENV_PATHS_ROOT: ~/.local/share/renv | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '4.5.2' | |
| use-public-rspm: true | |
| # Install system dependencies | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libcurl4-openssl-dev \ | |
| libssl-dev \ | |
| libxml2-dev \ | |
| libfontconfig1-dev \ | |
| libfreetype6-dev \ | |
| libpng-dev \ | |
| libtiff5-dev \ | |
| libjpeg-dev \ | |
| libharfbuzz-dev \ | |
| libfribidi-dev \ | |
| libgit2-dev \ | |
| libglpk-dev \ | |
| libgmp3-dev \ | |
| libhdf5-dev | |
| # Cache renv library | |
| - name: Cache renv packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RENV_PATHS_ROOT }} | |
| key: ${{ runner.os }}-renv-${{ hashFiles('renv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-renv- | |
| # Restore renv packages from lockfile | |
| - name: Restore renv packages | |
| run: | | |
| install.packages("renv") | |
| renv::restore() | |
| shell: Rscript {0} | |
| # Cache workshop data | |
| - name: Restore workshop data cache | |
| id: cache-data | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: data | |
| key: workshop-data-v3 | |
| - name: Download workshop data from Zenodo | |
| if: steps.cache-data.outputs.cache-hit != 'true' | |
| run: | | |
| echo "Cache miss - downloading from Zenodo..." | |
| mkdir -p data | |
| echo "Downloading heart-counts.Rds (~420MB)..." | |
| curl -L --retry 3 --max-time 1200 -o data/heart-counts.Rds "https://zenodo.org/records/18237749/files/heart-counts.Rds?download=1" | |
| echo "Downloading cellinfo_updated.Rds..." | |
| curl -L --retry 3 --max-time 60 -o data/cellinfo_updated.Rds "https://zenodo.org/records/18237749/files/cellinfo_updated.Rds?download=1" | |
| ls -lh data/ | |
| - name: Save workshop data cache | |
| if: steps.cache-data.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: data | |
| key: workshop-data-v3 | |
| - name: Verify data files | |
| run: | | |
| echo "Data files:" | |
| ls -lh data/ | |
| test -s data/heart-counts.Rds || exit 1 | |
| test -s data/cellinfo_updated.Rds || exit 1 | |
| # Print package versions for verification | |
| - name: Print package versions | |
| run: | | |
| cat("R version:", R.version.string, "\n\n") | |
| pkgs <- c("Seurat", "SeuratObject", "harmony", | |
| "edgeR", "limma", "speckle", "ggplot2") | |
| for (pkg in pkgs) { | |
| cat(sprintf("%-20s %s\n", pkg, as.character(packageVersion(pkg)))) | |
| } | |
| shell: Rscript {0} | |
| # Install pkgdown (not in renv.lock, needed for site building) | |
| - name: Install pkgdown | |
| run: | | |
| install.packages("pkgdown") | |
| shell: Rscript {0} | |
| # Install local package (needed for pkgdown to build reference docs) | |
| - name: Install local package | |
| run: R CMD INSTALL --no-multiarch --with-keep.source . | |
| # Build pkgdown site | |
| - name: Build site | |
| run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) | |
| shell: Rscript {0} | |
| # Deploy to GitHub Pages | |
| - name: Deploy to GitHub pages | |
| if: github.event_name != 'pull_request' | |
| uses: JamesIves/github-pages-deploy-action@v4.5.0 | |
| with: | |
| clean: false | |
| branch: gh-pages | |
| folder: docs |