Skip to content

Merge pull request #749 from niklasmei/fix_doc #329

Merge pull request #749 from niklasmei/fix_doc

Merge pull request #749 from niklasmei/fix_doc #329

Workflow file for this run

# This is a simple workflow to automatically generate API docs
name: Docs
# Controls when the workflow will run
on:
# Triggers the workflow on push to the main branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docs:
name: Build and publish Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install package
uses: ./.github/actions/install
- name: Build documentation
run: |
cd docs
make clean
sphinx-apidoc \
--module-first \
--separate \
--force \
-d 2 \
--templatedir=source/_templates/ \
-o source/api ../src/
sed -i "2s/.*/API/" source/api/graphnet.rst
make html
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.
git-config-email: andreas.sogaard@gmail.com
git-config-name: Andreas Søgaard