ci: update FSL envvars in Dockerfile-ci #1044
This file contains 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
name: Build and publish docs | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
- main | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- v* | |
workflow_dispatch: {} | |
jobs: | |
build-docs: | |
runs-on: ubuntu-latest | |
# Use custom docs CI image | |
container: ghcr.io/juaml/junifer-docs:main | |
steps: | |
- name: Check ANTs | |
run: | | |
echo "Using ANTs : $(antsRegistration --version)" | |
- name: Install system dependencies | |
run: | | |
# actions/checkout fails to identify Git as it's not in the CI image | |
apt-get -qq update && \ | |
apt-get -qq install -y \ | |
git \ | |
git-annex \ | |
make \ | |
jq | |
# Copy xfms directory | |
mkdir -p $HOME/junifer/data/xfms && \ | |
cp -ar /root/junifer/data/xfms/. $HOME/junifer/data/xfms/ | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
# require all of history to see all tagged versions' docs | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install -e ".[docs,neurokit2]" | |
python -m pip install git+https://github.com/dls-controls/sphinx-multiversion@only-arg | |
- name: Configure Git for DataLad | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Runner" | |
- name: Checkout gh-pages | |
# As we already did a deploy of gh-pages above, it is guaranteed to be there | |
# so check it out so we can selectively build docs below | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
path: docs/_build | |
- name: Build docs | |
# Use the args we normally pass to sphinx-build, but run sphinx-multiversion | |
run: | | |
# https://github.com/actions/checkout/issues/1169#issuecomment-2291682583 | |
git config --system --add safe.directory $(pwd) | |
make -C docs/ html | |
touch docs/_build/.nojekyll | |
cp docs/redirect.html docs/_build/index.html | |
- name: Publish docs to gh-pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build | |
keep_files: true |