Skip to content

Commit 9fe12c0

Browse files
committed
fix: add db doc generation
1 parent e525633 commit 9fe12c0

2 files changed

Lines changed: 9 additions & 22 deletions

File tree

.github/workflows/deploy-db-doc.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,10 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323

24-
- name: Setup Node
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: 24
28-
29-
- name: Get yarn cache directory
30-
id: yarn-cache-dir-path
31-
run: |
32-
echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
33-
34-
- uses: actions/cache@v4
35-
with:
36-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
37-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
38-
restore-keys: |
39-
${{ runner.os }}-yarn-
40-
41-
- name: yarn install and generate docs
42-
run: |
43-
yarn
44-
yarn db-doc:generate
24+
- name: generate DB docs
25+
run: mise run generate-db-docs
4526

4627
- name: Upload artifact
4728
uses: actions/upload-pages-artifact@v3

mise.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ description = "Build the application"
4848
run = "tsc -p tsconfig.build.json"
4949

5050
[tasks.migrate]
51+
depends = ["pnpm-install"]
5152
run = "drizzle-kit migrate"
5253
env = { _.file = '.env.development' }
5354

@@ -66,3 +67,8 @@ run = "jest --forceExit --verbose --coverage --silent --detectOpenHandles --maxW
6667

6768
[tasks.test]
6869
depends = ["vitest", "e2e"]
70+
71+
[tasks.generate-db-docs]
72+
depends = ["pnpm-install"]
73+
description = "Generate documentation for the database schemas"
74+
run = "drizzle-kit export > schema.sql && npx @liam-hq/cli erd build --input schema.sql --format postgres --output-dir db-documentation"

0 commit comments

Comments
 (0)