Merge pull request #24 from JoshuaWol/main #17
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: Update Api Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| name: Update API Docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install all subpackages | |
| run: | | |
| pip install -e Alt-Core | |
| pip install -e Alt-Cameras | |
| pip install -e Alt-ObjectLocalization | |
| pip install -e Alt-Dashboard | |
| pip install -e Alt-Pathplanning | |
| - name: Generate New API Docs | |
| run: python docs/generateapi.py | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git add . | |
| if ! git diff --cached --quiet; then | |
| git commit -m "Auto-update API docs" | |
| git push origin main | |
| else | |
| echo "No changes to commit." | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # - name: Trigger ReadTheDocs Build (create secrets first) | |
| # run: | | |
| # curl -X POST -d "" \ | |
| # -H "Authorization: Token ${{ secrets.RTD_TOKEN }}" \ | |
| # https://readthedocs.org/api/v3/projects/YOUR_PROJECT/versions/latest/builds/ |