Merge pull request #3649 from bcgov/NDT-537-Make-CBC-filtering-on-Sta… #1080
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: 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 |