Refactor template alignments to keep a fixed parcellation #207
Workflow file for this run
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 Deploy Sphinx Docs | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Step 2: Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
# Step 3: Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install torch --index-url https://download.pytorch.org/whl/cpu | |
pip install -e ".[doc, jax, test]" | |
# Step 4: Build Sphinx documentation | |
- name: Build Sphinx documentation | |
working-directory: doc | |
run: | | |
python -m sphinx -b html . _build/html | |
# Step 5: Upload Sphinx docs as an artifact | |
- name: Upload Sphinx docs artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sphinx-docs | |
path: doc/_build/html | |
deploy: | |
# Avoid running this job on a fork | |
if: github.repository == 'parietal-INRIA/fmralign' && github.ref == 'refs/heads/main' | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
# Step 6: Download Sphinx docs artifact | |
- name: Download Sphinx docs artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: sphinx-docs | |
path: doc/_build/html/ | |
# Step 7: Deploy to GitHub Pages | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: doc/_build/html |