Skip to content

Merge branch 'release/3.5.2' #37

Merge branch 'release/3.5.2'

Merge branch 'release/3.5.2' #37

Workflow file for this run

name: dbdocs
on:
push:
branches:
- main
env:
NODE_VERSION: 18
DB_NAME: cdhweb
DB_USER: cdhweb
DB_PASSWORD: cdhweb
jobs:
publish-dbdocs:
name: Publish dbdocs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Node is required to use dbdocs
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dbdocs
run: npm install -g dbdocs
# Python version to use is stored in the .python-version file, which is the
# convention for pyenv: https://github.com/pyenv/pyenv
- name: Get Python version
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: pip install -r requirements/test.txt
- name: Setup local_settings.py
run: |
cp ci/testsettings.py cdhweb/local_settings.py
python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> cdhweb/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