pin pydantic version due to breaking change/bug #109
This file contains 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: Publish dbdocs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install DBML CLI and dbdocs | |
run: sudo npm install -g @dbml/cli dbdocs | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install local pkg | |
run: pip install .[vendors] | |
- name: Generate SQL schema | |
run: sc-crawler schemas create --dialect mysql > schema.sql | |
- name: Convert SQL schema to DBML | |
run: sql2dbml --mysql schema.sql -o schema.dbml | |
- name: Add project description | |
run: cat project.dbml >> schema.dbml | |
- name: Update dbdocs project | |
env: | |
DBDOCS_TOKEN: ${{ secrets.DBDOCS_TOKEN }} | |
run: dbdocs build ./schema.dbml --project sc-crawler | |
- name: Archive SQL and DBML schemas | |
uses: actions/upload-artifact@v4 | |
with: | |
name: schemas | |
path: schema.* |