Skip to content

Merge pull request #106 from intelligent-systems-course/add-names-to-… #7

Merge pull request #106 from intelligent-systems-course/add-names-to-…

Merge pull request #106 from intelligent-systems-course/add-names-to-… #7

Workflow file for this run

# This workflow will install create documentation for the project and upload it to google pages
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Documentation
# security: restrict permissions for CI jobs.
permissions:
contents: read
on:
push:
branches:
- 'main'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build the documentation and upload the static HTML files as an artifact.
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Upgrade pip and build dependencies
run: |
python3 -m pip install --upgrade pip setuptools wheel
- name: Install package
run: |
python -m pip install .[doc]
- name: Create output dir
run: |
rm -rf _docs
mkdir _docs
- name: Build documentation
run: |
pdoc src/schnapsen executables/ -o _docs/
- uses: actions/upload-pages-artifact@v2
with:
path: "./_docs/"
# Deploy the artifact to GitHub pages.
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v2