forked from Princeton-CDH/cdh-web
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (32 loc) · 978 Bytes
/
dbdocs.yml
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
40
41
42
name: dbdocs
on:
push:
branches:
- main
env:
DJANGO_ENV: test
jobs:
publish-dbdocs:
name: Publish dbdocs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Node is required to use dbdocs
- name: Setup node
uses: actions/setup-node@v4
- name: Install dbdocs
run: npm install -g dbdocs
- name: Setup Python
uses: actions/setup-python@v5
- name: Install python dependencies
run: pip install -r requirements/test.txt
- name: Setup local_settings.py
run: python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> cdhweb/settings/local_settings.py
# Build and publish dbdocs
- name: Generate DBML
run: python manage.py dbml > cdhweb.dbml
- name: Push to dbdocs
env:
DBDOCS_TOKEN: ${{ secrets.DBDOCS_TOKEN }}
run: dbdocs build cdhweb.dbml --project cdhweb