Skip to content

Update autodoc.yml

Update autodoc.yml #1

Workflow file for this run

on:
workflow_call:
inputs:
run-name:
required: false
description: 'Name of the run'
default: 'Running autodoc'
type: string
src:
required: false
description: 'Directory with code'
default: 'src'
type: string
name: documentation
run-name: ${{ inputs.run-name }}
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
token: token: ${{ secrets.GH_PAT || github.token }}

Check failure on line 23 in .github/workflows/autodoc.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/autodoc.yml

Invalid workflow file

You have an error in your yaml syntax on line 23
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Install project dependencies
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Sphinx build
run: |
mkdir doc
cd doc
sphinx-quickstart -q -p ${{ github.event.repository.name }} -a AUVSL -v 1.0 --ext-githubpages --ext-viewcode --ext-coverage --extensions="sphinx.ext.napoleon","myst_parser","sphinx.ext.inheritance_diagram","sphinx.ext.todo","sphinx.ext.viewcode"
sed -i '1s/^/import sys\nimport os\nsys.path.append(os.path.abspath(".."))\nsys.path.append(os.path.abspath("..\/${{ inputs.src }}\/"))\n/' ./conf.py
sed -i 's/alabaster/sphinx_rtd_theme/g' ./conf.py
sphinx-apidoc -o source/ ../${{ inputs.src }}/ -a --implicit-namespaces -P
sphinx-build . _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')}}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/_build/
force_orphan: true