Skip to content

fixing doc publishing #97

fixing doc publishing

fixing doc publishing #97

Workflow file for this run

# Builds the Sphinx documentation
name: Docs Build
on:
pull_request:
branches: [main]
paths:
- docs/**
- cneuromax/**
- .github/workflows/docs-build.yaml
jobs:
docs-build:
runs-on: ubuntu-22.04
steps:
- name: Checkout the GitHub repo
uses: actions/checkout@v4
- name: Load Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: pip install -r ./docs/requirements.txt
- name: Build the documentation
id: build
run: sphinx-build -b html ./docs/ ./docs/build/
- name: Push the documentation
run: |
git config --local user.email "[email protected]"
git config --local user.name "MaximilienLC"
ls | grep -vE 'docs|.git' | xargs rm -rf
cp -r ./docs/build/* .
rm -rf ./docs
git add .
git commit -m "New documentation build"
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
force: true