CI Integration

Integrate with CI

You can use your unique access token to update projects with continuous integration (CI) systems:

First, generate your access token on local after logged in.

$ dbdocs token -g
✔ Verify your identity
✔ Your access token is: eyJhbGciOi...
  › Warning: Please save this token. You cannot see it again.

Then add DBDOCS_TOKEN as a new environment variable in your CI machine.


It's done! Now you can run dbdocs build command on your CI without login actions.

$ dbdocs build <path to your dbml file>/Ecommerce.dbml

GitHub's Action example

You can try it out with our GitHub's Action quick setup

name: CI

    branches: [ main ]
    branches: [ main ]

  runs-on: ubuntu-latest

  - uses: actions/checkout@v2

  - name: Install dbdocs
    run: sudo npm install -g dbdocs

  - name: Check dbdocs
    run: dbdocs

  - name: Update dbdocs project
      DBDOCS_TOKEN: eyJhbGciOi...
    run: dbdocs build ./ecommerce.dbml

Revoke Access Token

Remove your existing token with this command:

$ dbdocs token -r
✔ Verify your identity
✔ Your access token has been revoked
© 2023 Holistics Software. All rights reserved.