Skip to content

build: Move from poetry to uv (#25) #33

build: Move from poetry to uv (#25)

build: Move from poetry to uv (#25) #33

Workflow file for this run

name: Build Documentation
on:
push:
branches:
- main
jobs:
deploy-doc:
name: Build and deploy documentation 📚
if: startsWith(github.event.head_commit.message, 'doc')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install -r requirements/prod.txt
pip install -r requirements/doc.txt
pip install -e .
- name: Build the documentation
run: |
pip list
python docs/dump_github_releases.py
python docs/generate_visualization_examples.py
mkdocs build
- uses: actions/upload-artifact@master
with:
name: DocumentationHTML
path: site/
- name: Commit documentation changes
run: |
git clone https://github.com/kschweiger/track_analyzer.git --branch gh-pages --single-branch gh-pages
cp -r site/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}