name: Deploy to Github Pages

on:
  push:
    branches: [ "main" ]
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Install poetry
        run: pipx install poetry
      
      - name: Setup Python
        uses: actions/setup-python@v5.0.0
        with:
          python-version: '3.x'
          cache: poetry
      
      - name: Install dependencies
        run: poetry install
      
      - name: Run gh-deploy
        run: poetry run mkdocs gh-deploy --force
