(debug) Fix backend refresh error and add error middleware for E2E #15
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 OpenAPI Schema | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'src/api/**' | |
| - 'src/models/**' | |
| - 'scripts/generate_schema.py' | |
| workflow_dispatch: | |
| jobs: | |
| update-schema: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpango-1.0-0 libpangoft2-1.0-0 | |
| - name: Install dependencies | |
| run: uv sync --all-extras --dev | |
| - name: Generate Schema | |
| run: uv run scripts/generate_schema.py | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| git diff --exit-code herecrm-pwa-openapi.yaml herecrm-pwa-openapi.json || echo "changed=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push if changed | |
| if: steps.git-check.outputs.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 herecrm-pwa-openapi.yaml herecrm-pwa-openapi.json | |
| git commit -m "chore: update autogenerated OpenAPI schema [skip ci]" | |
| git push |