Skip to content

FIX: deploy docs wait #68

FIX: deploy docs wait

FIX: deploy docs wait #68

Workflow file for this run

name: Build Docs and Deploy
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install mdbtools
run: |
sudo apt-get update
sudo apt-get install -y mdbtools
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "export PATH=$HOME/.local/bin:\$PATH" >> $GITHUB_ENV
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache Node.js dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Node.js dependencies
run: |
npm install
- name: Install dependencies
run: |
poetry install
- name: Build Sphinx documentation
run: |
poetry run sphinx-build -b html docs/source docs/build/html
- name: Upload documentation as artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/build/html
deploy-docs:
needs: build-docs
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
steps:
- name: Download documentation artifact
uses: actions/download-artifact@v4
with:
name: docs
path: docs/build/html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html