update: dbml note #6
Workflow file for this run
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: update erd | |
on: | |
push: | |
paths: | |
- 'prisma/schema.prisma' | |
branches: | |
- master | |
jobs: | |
build: | |
name: Generate and Build ERD | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
ssh-key: ${{ secrets.DBDOCS_COMMIT_KEY }} | |
- name: Install prisma-dbml-generator | |
run: sudo npm install -g prisma-dbml-generator | |
- name: Generate dbml | |
run: npx prisma generate | |
- name: Install dbdocs | |
run: sudo npm install -g dbdocs | |
- name: Check dbdocs | |
run: dbdocs --version | |
- name: Build and Update ERD | |
run: dbdocs build ./prisma/dbml/schema.dbml | |
env: | |
DBDOCS_TOKEN: ${{ secrets.DBDOCS_TOKEN }} | |
- name: Commit and Push | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "GitHub Actions [bot]" | |
git commit -am "Update dbml" | |
git push -u origin master |