mirror of
https://github.com/ModOrganizer2/pystubs-generation.git
synced 2026-07-27 14:07:13 -07:00
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
name: Build Documentation
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.12
|
|
- uses: abatilo/actions-poetry@v2
|
|
- name: Install
|
|
run: poetry install
|
|
- name: Install libgl1
|
|
run: sudo apt install -y libgl1 libegl1 libglib2.0-0 libxkbcommon0 libdbus-1-3
|
|
- name: Copy stubs
|
|
run: cp stubs/2.5.2/mobase-stubs/__init__.pyi docs/mobase.py
|
|
- name: Build
|
|
run: poetry run sphinx-build -b html docs/source docs/build
|
|
env:
|
|
PYTHONPATH: docs
|
|
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
name: Deploy Documentation
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
ssh-key: ${{ secrets.DEPLOY_KEY }}
|
|
repository-name: ModOrganizer2/python-plugins-doc
|
|
branch: master
|
|
folder: docs/build
|