mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
9953216980
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com> Co-authored-by: Shivam Saini <51438830+shivamsn97@users.noreply.github.com> Co-authored-by: Aditya Yadav <adityayadav11082@gmail.com> Co-authored-by: Dmitry Kolomatskiy <58207913+lemontree210@users.noreply.github.com> Co-authored-by: Crsi <47722349+CrsiX@users.noreply.github.com> Co-authored-by: poolitzer <github@poolitzer.eu> Co-authored-by: Aditya <clot27@apx_managed.vanilla>
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Test Documentation Build
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- doc-fixes
|
|
push:
|
|
branches:
|
|
- master
|
|
- doc-fixes
|
|
|
|
jobs:
|
|
test-sphinx-build:
|
|
name: test-sphinx-build
|
|
runs-on: ${{matrix.os}}
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.9]
|
|
os: [ubuntu-latest]
|
|
fail-fast: False
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
cache-dependency-path: '**/requirements*.txt'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -W ignore -m pip install --upgrade pip
|
|
python -W ignore -m pip install -r requirements-all.txt
|
|
- name: Test autogeneration of admonitions
|
|
run: pytest -v --tb=short tests/docs/admonition_inserter.py
|
|
- name: Build docs
|
|
run: sphinx-build docs/source docs/build/html -W --keep-going -j auto
|
|
- name: Upload docs
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: HTML Docs
|
|
retention-days: 7
|
|
path: |
|
|
# Exclude the .doctrees folder and .buildinfo file from the artifact
|
|
# since they are not needed and add to the size
|
|
docs/build/html/*
|
|
!docs/build/html/.doctrees
|
|
!docs/build/html/.buildinfo
|