Rename sensor api to stream api #43
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: Generate OpenAPI specification | |
| permissions: | |
| contents: write | |
| env: | |
| OAS_CHANGED: false | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| run-script: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.11.10 | |
| - name: Install dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Run docs.py | |
| run: python docs.py -f docs/.gitbook/assets/oas.yml | |
| - name: Check for changes | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "OAS_CHANGED=true" >> $GITHUB_ENV | |
| fi | |
| - name: Commit oas.yml | |
| if: env.OAS_CHANGED == 'true' | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/.gitbook/assets/oas.yml | |
| git commit -m "Update oas.yml" | |
| git push |