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.
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
You can try it out with our GitHub's Action quick setup
name: CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/[email protected] - name: Install dbdocs run: sudo npm install -g dbdocs - name: Check dbdocs run: dbdocs - name: Update dbdocs project env: DBDOCS_TOKEN: eyJhbGciOi... run: dbdocs build ./ecommerce.dbml
Remove your existing token with this command:
$ dbdocs token -r ✔ Verify your identity ✔ Your access token has been revoked