Release 0.10.0 #14
Workflow file for this run
This file contains hidden or 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: mdbook documentation. | |
| on: | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| branches: | |
| - 'main' | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - 'docs/**' | |
| tags: | |
| - "*" | |
| workflow_dispatch: | |
| jobs: | |
| build-docs: | |
| name: mdbook database schema | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the source | |
| uses: actions/checkout@v6 | |
| - name: Set env | |
| run: cp .env.example .env | |
| - name: Pull Docker images | |
| run: docker compose pull db api | |
| - name: Run PostgSail Database | |
| # Environment variables | |
| env: | |
| # The hostname used to communicate with the PostgreSQL service container | |
| PGHOST: localhost | |
| PGPORT: 5432 | |
| PGDATABASE: signalk | |
| PGUSER: username | |
| PGPASSWORD: password | |
| PGSAIL_DB_URI: postgres://username:password@localhost:5432/signalk | |
| run: | | |
| set -eu | |
| source .env | |
| docker compose stop || true | |
| docker compose rm || true | |
| docker compose up -d db && sleep 15 | |
| docker compose up migrate | |
| docker compose ps -a | |
| - name: Generate documentation | |
| # Environment variables | |
| env: | |
| PGSAIL_DB_URI: postgres://username:password@localhost:5432/signalk | |
| run: | | |
| cd docs | |
| go install github.com/KarnerTh/mermerd@v0.13.0 | |
| ~/go/bin/mermerd --runConfig ../mermerdConfig.yaml | |
| mv postgsail.md src/ | |
| source <(curl -sL https://raw.githubusercontent.com/k1LoW/tbls/main/use) | |
| tbls doc --rm-dist -c ../tblsConfig.yml --sort | |
| - name: Install mdbook & plugins | |
| uses: taiki-e/install-action@v2 | |
| with: { tool: 'mdbook,mdbook-toc,mdbook-tabs,mdbook-mermaid,mdbook-katex,mdbook-alerts,mdbook-linkcheck' } | |
| - name: Install mdbook plugins | |
| run: mdbook-mermaid install docs | |
| #mdbook-excalidraw install docs | |
| - name: Build documentation | |
| run: mdbook build docs | |
| - name: Show the logs | |
| if: always() | |
| run: | | |
| docker compose logs |