Skip to content

Build and Deploy Docsite #105

Build and Deploy Docsite

Build and Deploy Docsite #105

name: Build and Deploy Docsite
on:
push:
tags:
- '*'
workflow_dispatch: # Used to make post-release docfixes
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: single-cell-8c64g-runner
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python deps 🔧
run: |
python -m pip install -U pip setuptools wheel
pip install -r ./api/python/cellxgene_census/scripts/requirements-dev.txt
pip install -r ./docs/requirements.txt
pip install -e './api/python/cellxgene_census/[experimental]'
mkdir -p docsite
touch docsite/.nojekyll
- name: Install Pandoc
run: |
sudo apt-get install -y pandoc
- name: Install misc deps
run: |
sudo apt-get install -y libcairo2-dev rsync
- name: Build Sphinx website
run: |
cd docs/
make clean && make html
cp -r _build/html/* ../docsite/.
- uses: r-lib/actions/setup-r@v2
with:
extra-repositories: https://tiledb-inc.r-universe.dev
- uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: ./api/r/cellxgene.census
extra-repositories: https://tiledb-inc.r-universe.dev
extra-packages: any::rcmdcheck, any::styler, any::roxygen2, any::pkgdown, any::BiocManager,
needs: check
cache: true
- name: Build pkgdown website
run: |
cd api/r/cellxgene.census
mv _vignettes vignettes
Rscript -e 'BiocManager::install("scater")'
Rscript -e 'pkgdown::build_site()'
cd ../../../
mkdir -p docsite/r
cp -r api/r/cellxgene.census/docs/* docsite/r/.
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docsite # The folder the action should deploy.
branch: gh-pages