Merge branch 'release/4.0' #39
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: 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 |