Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy Documentation

on:
push:
branches:
- dev
- main

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
run: |
python3 -m pip install --user uv
- name: Create virtual environment
run: |
uv venv
- name: Install documentation dependencies
run: |
uv pip install --group docs
- name: Configure Git user
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Build and deploy documentation
run: |
.venv/bin/mkdocs gh-deploy --force
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# OxyTCMRI

[![Pytest](https://github.com/tomboulier/oxytcmri-legacy/actions/workflows/pytest.yml/badge.svg)](https://github.com/tomboulier/oxytcmri-legacy/actions/workflows/pytest.yml)
[![codecov](https://codecov.io/gh/tomboulier/oxytcmri-legacy/graph/badge.svg?token=UVPDQPWEYR)](https://codecov.io/gh/tomboulier/oxytcmri-legacy)
[![Pytest](https://github.com/tomboulier/oxytcmri-dti-processing/actions/workflows/pytest.yml/badge.svg)](https://github.com/tomboulier/oxytcmri-dti-processing/actions/workflows/pytest.yml)
[![codecov](https://codecov.io/gh/tomboulier/oxytcmri-dti-processing/graph/badge.svg?token=UVPDQPWEYR)](https://codecov.io/gh/tomboulier/oxytcmri-dti-processing)
[![Documentation](https://github.com/tomboulier/oxytcmri-dti-processing/actions/workflows/docs.yml/badge.svg)](https://github.com/tomboulier/oxytcmri-dti-processing/actions/workflows/docs.yml)

Analysis of Diffusion Tensor Imaging (DTI) data from the Oxy-TC trial.

Expand Down Expand Up @@ -171,6 +172,8 @@ python oxytcmricli.py compute-brain-lesions-volumes --settings <settings_filepat

This project uses [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) to build its documentation.

The documentation is automatically built and deployed to GitHub Pages via CI/CD when changes are pushed to the `dev` or `main` branches. You can view the live documentation at `https://tomboulier.github.io/oxytcmri-dti-processing/`.

### Build the documentation locally

From the root of the repository:
Expand All @@ -193,13 +196,12 @@ mkdocs serve
This will build the documentation, start a local server, which address will be given in the terminal. This server will
automatically reload the documentation when you make changes to the source files.

### Deploy the documentation on GitHub Pages
### Deploy the documentation manually

To deploy the documentation on GitHub Pages, you can use the following command:
If needed, you can manually deploy the documentation to GitHub Pages using the following command:

```bash
mkdocs gh-deploy
```

This will build the documentation and deploy it to the `gh-pages` branch of your repository. The documentation will be
available at `https://tomboulier.github.io/oxytcmri-legacy/`.
This will build the documentation and deploy it to the `gh-pages` branch of your repository.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: Oxy-TC DTI
site_url: https://tomboulier.github.io/oxytcmri-legacy/
site_url: https://tomboulier.github.io/oxytcmri-dti-processing/
theme:
name: material

Expand Down