name: Deploy on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt pip install -e . - name: Deploy to PyPI env: PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} run: | if [ "${{ github.event.release.prerelease }}" == "false" ]; then pip install build python -m build twine upload dist/*; fi