Skip to content

Commit e8fa3a2

Browse files
committed
add docs
1 parent ee770a7 commit e8fa3a2

File tree

6 files changed

+420
-17
lines changed

6 files changed

+420
-17
lines changed

.github/workflows/docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "📚 Documentation Builder"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- docs
8+
paths:
9+
- .github/workflows/docs_builder.yml
10+
- pgserviceparser/**/*.py
11+
- docs/**/*
12+
- requirements/documentation.txt
13+
tags:
14+
- "*"
15+
16+
pull_request:
17+
branches:
18+
- main
19+
paths:
20+
- .github/workflows/docs_builder.yml
21+
- pgserviceparser/**/*.py
22+
- docs/**/*
23+
- requirements/documentation.txt
24+
25+
# Allow one concurrent deployment
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
build-docs:
32+
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- name: Get source code
37+
uses: actions/checkout@v4
38+
39+
- uses: actions/setup-python@v5
40+
with:
41+
python-version: '3.12'
42+
43+
- name: Install pgserviceparser
44+
run: python -m pip install -r docs/requirements.txt
45+
46+
- name: Build documentation
47+
run: mkdocs build -f docs/mkdocs.yml
48+
49+
- uses: actions/upload-artifact@v4
50+
if: ${{ github.event_name == 'pull_request' }}
51+
with:
52+
name: docs
53+
path: docs/site
54+
if-no-files-found: error
55+
56+
- name: Deploy to GitHub Pages
57+
if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name)
58+
working-directory: docs
59+
run: mkdocs gh-deploy --force

README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Managing database migrations in a Version Control System (VCS) can be challengin
3030

3131
### Best Practices
3232

33-
- **Separate Schemas**: Isolate data and business logic (e.g., views, triggers) into distinct schemas for easier upgrades.
33+
- **Separate Schemas**: Isolate data from business logic (e.g., views, triggers) into distinct schemas for easier upgrades.
3434
- **Read More**: Explore articles like [Get Your Database Under Version Control](https://blog.codinghorror.com/get-your-database-under-version-control/) for insights into database versioning.
3535

3636
### Learn More
@@ -42,34 +42,33 @@ Managing database migrations in a Version Control System (VCS) can be challengin
4242
PUM was developed to address challenges in the [TEKSI](https://github.com/TESKI) project, an open-source GIS for network management based on [QGIS](http://qgis.org/fr/site/).
4343

4444

45+
46+
4547
## Command line
4648

4749
### pum
4850

4951
The usage of the pum command is:
5052
```commandline
51-
5253
usage: pum [-h] [-v] [-c CONFIG_FILE]
53-
{check,dump,restore,baseline,info,upgrade,test}
54-
...
54+
{check,dump,restore,baseline,info,upgrade,test}
55+
...
5556
5657
optional arguments:
57-
-h, --help show this help message and exit
58-
-v, --version print the version and exit
58+
-h, --help Show this help message and exit.
59+
-v, --version Print the version and exit.
5960
-c CONFIG_FILE, --config_file CONFIG_FILE
60-
set the config file
61+
Specify the configuration file.
6162
6263
commands:
63-
valid pum commands
64-
6564
{check,dump,restore,baseline,info,upgrade,test}
66-
check check the differences between two databases
67-
dump dump a Postgres database
68-
restore restore a Postgres database from a dump file
69-
baseline Create upgrade information table and set baseline
70-
info show info about upgrades
71-
upgrade upgrade db
72-
65+
check Compare two databases and display differences.
66+
dump Create a backup of a PostgreSQL database.
67+
restore Restore a PostgreSQL database from a backup file.
68+
baseline Initialize upgrade information table and set baseline.
69+
info Display the status of applied or pending upgrades.
70+
upgrade Apply SQL delta files to upgrade the database.
71+
test Run tests to validate database migrations.
7372
```
7473

7574
Pum is using [postgres connection service file](https://www.postgresql.org/docs/current/static/libpq-pgservice.html) to define the database connection parameters.

0 commit comments

Comments
 (0)