-
-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (37 loc) · 1.18 KB
/
deploy_db_model.yml
File metadata and controls
39 lines (37 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy DB Model
on:
workflow_run:
# Esto tiene q hacer match con los nombres de los workflows de tests
workflows: ["Graphql and Database Tests", "Lint and Typecheck"]
branches: [main]
types:
- completed
jobs:
deploy:
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Deploy to dbdocs.io
runs-on: ubuntu-latest
steps:
- name: ⏳ Cloning repo
uses: actions/checkout@v4
with:
show-progress: false
- name: ⬢ Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: 📦 Download Cached Package Dependencies
uses: actions/cache@v3
env:
cache-name: NPM
with:
path: ~/.npm
key: CACHE-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
- name: 📥 Install dependencies
run: npm ci --prefer-offline --no-audit --legacy-peer-deps --cache ~/.npm
- name: 🛠️ Build new DB model
run: npm run db:model
- name: 🛳️ Deploy DB model
env:
DBDOCS_TOKEN: ${{ secrets.DBDOCS_TOKEN }}
run: npx dbdocs build ./drizzle/schema.dbml --project API