Skip to content

Merge pull request #3643 from bcgov/NDT-567-Add-Data-team-email-for-i… #1065

Merge pull request #3643 from bcgov/NDT-567-Add-Data-team-email-for-i…

Merge pull request #3643 from bcgov/NDT-567-Add-Data-team-email-for-i… #1065

Workflow file for this run

name: Generate Schemaspy Docs
on:
push:
branches: [ "main" ]
env:
NODE_ENV: test
PGPASSWORD: postgres
PGUSER: postgres
PGDATABASE: ccbc
jobs:
install-test-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: dev env setup
uses: ./.github/actions/dev-env-setup
- run: make install_dev_tools
- run: make stop_pg # cleanly stop the database, otherwise it will complain in the subsequent jobs
- run: yarn install --frozen-lockfile --check-files
working-directory: ./app
generate_schemaspy:
needs: [install-test-env]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: dev env setup
uses: ./.github/actions/dev-env-setup
- name: deploy db migrations
run: make start_pg && make drop_db && make deploy_db_migrations
- name: Create Output Folder
run: |
mkdir output
chmod a+rwx -R output
- name: Run Schemaspy
run: docker run --network host -v "$PWD/output:/output" schemaspy/schemaspy:latest -t pgsql -db ccbc -host 127.0.0.1 -port 5432 -u postgres -p postgres -schemas ccbc_public
- name: Deploy to Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: output
target-folder: schemaspy
- name: Deploy to Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: app/public/data
target-folder: schemaspy/data