Skip to content

Merge pull request #10 from SpareCores/gergely/fix-region-id #17

Merge pull request #10 from SpareCores/gergely/fix-region-id

Merge pull request #10 from SpareCores/gergely/fix-region-id #17

Workflow file for this run

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 schema 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.*