Skip to content
Merged
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
77 changes: 77 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Deploy docs

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{
github.event_name == 'pull_request'
&& format('pr-{0}', github.event.number)
|| github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake g++ pkg-config \
zlib1g-dev libeigen3-dev libzip-dev \
ninja-build doxygen

- name: Install Python dependencies
run: python3 -m pip install -r docs/requirements.txt

- name: Build docs
run: |
cmake -S . -B build -DTRX_BUILD_DOCS=ON
cmake --build build --target docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: ${{ github.event_name == 'pull_request'
&& format('github-pages-preview-{0}', github.event.number)
|| 'github-pages' }}
path: docs/_build/html

deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

deploy-preview:
if: github.event_name == 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages-preview-${{ github.event.number }}
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy PR preview
id: deployment
uses: actions/deploy-pages@v4
with:
preview: true
artifact_name: github-pages-preview-${{ github.event.number }}
29 changes: 0 additions & 29 deletions .readthedocs.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TRX-cpp

[![Documentation](https://readthedocs.org/projects/trx-cpp/badge/?version=latest)](https://trx-cpp.readthedocs.io/en/latest/)
[![Docs](https://img.shields.io/badge/docs-github.io-blue?style=flat&logo=github)](https://tee-ar-ex.github.io/trx-cpp/)
[![codecov](https://codecov.io/gh/tee-ar-ex/trx-cpp/branch/main/graph/badge.svg)](https://codecov.io/gh/tee-ar-ex/trx-cpp)

A C++17 library for reading, writing, and memory-mapping the [TRX tractography format](https://github.com/tee-ar-ex/trx-spec) — efficient storage for large-scale tractography data.
Expand Down Expand Up @@ -39,11 +39,11 @@ auto positions = trx.positions.as_matrix<float>(); // (NB_VERTICES, 3)
trx.close();
```

See [Building](https://trx-cpp.readthedocs.io/en/latest/building.html) for platform-specific dependency installation and [Quick Start](https://trx-cpp.readthedocs.io/en/latest/quick_start.html) for a complete first program.
See [Building](https://tee-ar-ex.github.io/trx-cpp/building.html) for platform-specific dependency installation and [Quick Start](https://tee-ar-ex.github.io/trx-cpp/quick_start.html) for a complete first program.

## Documentation

Full documentation is at **[trx-cpp.readthedocs.io](https://trx-cpp.readthedocs.io/en/latest/)**.
Full documentation is at **[tee-ar-ex.github.io/trx-cpp](https://tee-ar-ex.github.io/trx-cpp/)**.

## Third-party notices

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# TRX-cpp Documentation

```{image} https://readthedocs.org/projects/trx-cpp/badge/?version=latest
```{image} https://img.shields.io/badge/docs-github.io-blue?style=flat&logo=github
:alt: Documentation Status
:target: https://trx-cpp.readthedocs.io/en/latest/
:target: https://tee-ar-ex.github.io/trx-cpp/
```

```{image} https://codecov.io/gh/tee-ar-ex/trx-cpp/branch/main/graph/badge.svg
Expand Down
Loading