fix(ml): simplify dataset paths for ultralytics and analyzer #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate and Deploy MkDocs | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Validate Python syntax | |
| run: | | |
| python - <<'PY' | |
| import pathlib | |
| import py_compile | |
| for path in pathlib.Path('.').rglob('*.py'): | |
| py_compile.compile(str(path), doraise=True) | |
| PY | |
| - name: Validate shell syntax | |
| run: | | |
| find . -name '*.sh' -print0 | xargs -0 -n 1 bash -n | |
| - name: Install docs dependencies | |
| run: pip install -r docs/requirements-mkdocs.txt | |
| - name: Build docs | |
| run: mkdocs build --strict | |
| deploy: | |
| name: Deploy to gh-pages | |
| needs: validate | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install docs dependencies | |
| run: pip install -r docs/requirements-mkdocs.txt | |
| - name: Configure git for token-based push | |
| env: | |
| GH_PAGES_TOKEN: ${{ secrets.GH_PAGES_TOKEN }} | |
| run: | | |
| if [ -z "$GH_PAGES_TOKEN" ]; then | |
| echo "Missing required secret: GH_PAGES_TOKEN" | |
| exit 1 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git remote set-url origin "https://x-access-token:${GH_PAGES_TOKEN}@github.com/${{ github.repository }}.git" | |
| - name: Deploy docs | |
| run: mkdocs gh-deploy --force --clean |