Skip to content

Add API documentation workflow #5

Add API documentation workflow

Add API documentation workflow #5

Workflow file for this run

name: Generate API documentation
on:
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Set MATHESAR_DATABASES environment variable
run: |
echo "export MATHESAR_DATABASES=postgresql://localhost:5432/mathesar" >> $GITHUB_ENV
- name: Build Docker image
run: docker compose -f docker-compose.yml -f docker-compose.dev.yml up dev-service
- name: Generate API documentation
uses: addnab/docker-run-action@v3
with:
image: mathesar/mathesar-dev:latest
run: ./manage.py spectacular --color --file schema.yml
shell: python

Check failure on line 30 in .github/workflows/update-api-docs.yml

View workflow run for this annotation

GitHub Actions / Generate API documentation

Invalid workflow file

The workflow is not valid. .github/workflows/update-api-docs.yml (Line: 30, Col: 9): Unexpected value 'shell'
- name: Check if schema file has changed
run: git diff --quiet schema.yml || exit 0
- name: Commit schema file
run: git add schema.yml && git commit -m "Updated schema file"
- name: Push changes to remote branch
run: git push origin ${{ github.head_ref }}