Skip to content

Commit b47b4a2

Browse files
committed
[!] transform Sphinx manual to mkdocs-material (#711)
* add build-docs GHA job * bump go and python version * use cache for pip * fix links * fix readme badges
1 parent f675892 commit b47b4a2

27 files changed

+752
-761
lines changed

.github/workflows/build.yml

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
name: Go Build & Test
1+
name: Build and Test
2+
3+
permissions:
4+
contents: write
5+
packages: write
6+
pages: write
7+
28
on:
9+
push:
10+
branches:
11+
- master
312
pull_request:
13+
paths-ignore: ['docs/**', 'mkdocs.yml']
414
workflow_dispatch:
515

616
concurrency:
@@ -92,8 +102,6 @@ jobs:
92102
- name: Test
93103
run: go test -v -p 1 -parallel 1 -failfast ./...
94104

95-
96-
97105
test-postgresql-ubuntu:
98106
if: true # false to skip job during debug
99107
name: Test and Build on Ubuntu
@@ -145,3 +153,48 @@ jobs:
145153
with:
146154
version: latest
147155
args: release --snapshot --skip=publish --clean
156+
157+
build-docs:
158+
if: true # false to skip job during debug
159+
needs: [test-postgresql-ubuntu, test-postgresql-windows, test-postgresql-macos]
160+
name: Build Docs
161+
runs-on: ubuntu-latest
162+
steps:
163+
164+
- name: Check out code
165+
uses: actions/checkout@v5
166+
167+
- name: Configure Git
168+
run: |
169+
git config user.name "${GITHUB_ACTOR}"
170+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
171+
172+
- name: Set up Golang
173+
uses: actions/setup-go@v6
174+
with:
175+
go-version: '1.25'
176+
177+
- name: Set up gopages
178+
run: go install github.com/johnstarich/go/[email protected]
179+
180+
- name: Build Developer Docs
181+
run: gopages -out "docs/godoc" -base "/pg_timetable/devel/godoc" -internal
182+
183+
- name: Set up Python
184+
uses: actions/setup-python@v6
185+
with:
186+
python-version: 3.13
187+
cache: 'pip'
188+
cache-dependency-path: '**/requirements-doc.txt'
189+
190+
- name: Install dependencies
191+
run: pip install -r docs/requirements-doc.txt
192+
193+
- name: Check if we should push to gh-pages
194+
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
195+
run: |
196+
git fetch origin gh-pages --depth=1
197+
echo "push_opt=--push" >> $GITHUB_ENV
198+
199+
- name: Build mkdocs
200+
run: mike deploy ${{ env.push_opt }} devel

.readthedocs.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1+
[![Documentation](https://img.shields.io/badge/Documentation-%F0%9F%93%9C-666?logo=github)](https://cybertec-postgresql.github.io/pg_timetable/)
12
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
2-
![Build & Test](https://github.com/cybertec-postgresql/pg_timetable/workflows/Go%20Build%20&%20Test/badge.svg)
3-
[![Coverage Status](https://coveralls.io/repos/github/cybertec-postgresql/pg_timetable/badge.svg?branch=master&service=github)](https://coveralls.io/github/cybertec-postgresql/pg_timetable?branch=master)
4-
[![Documentation Status](https://readthedocs.org/projects/pg-timetable/badge/?version=master)](https://pg-timetable.readthedocs.io/en/master/?badge=master)
5-
[![Release](https://img.shields.io/github/v/release/cybertec-postgresql/pg_timetable?include_prereleases)](https://github.com/cybertec-postgresql/pg_timetable/releases)
6-
[![Github All Releases](https://img.shields.io/github/downloads/cybertec-postgresql/pg_timetable/total?style=flat-square)](https://github.com/cybertec-postgresql/pg_timetable/releases)
7-
[![Docker Pulls](https://img.shields.io/docker/pulls/cybertecpostgresql/pg_timetable)](https://hub.docker.com/r/cybertecpostgresql/pg_timetable)
8-
[![Go Report Card](https://goreportcard.com/badge/github.com/cybertec-postgresql/pg_timetable)](https://goreportcard.com/report/github.com/cybertec-postgresql/pg_timetable)
3+
[![Build and Test](https://github.com/cybertec-postgresql/pg_timetable/actions/workflows/build.yml/badge.svg)](https://github.com/cybertec-postgresql/pg_timetable/actions/workflows/build.yml)
4+
[![Coverage Status](https://img.shields.io/coverallsCoverage/github/cybertec-postgresql/pg_timetable?branch=master&label=Coverage&color=yellow)](https://coveralls.io/github/cybertec-postgresql/pg_timetable?branch=master)
5+
[![Github All Releases](https://img.shields.io/github/downloads/cybertec-postgresql/pg_timetable/total?label=Downloads)](https://github.com/cybertec-postgresql/pg_timetable/releases)
6+
[![Docker Pulls](https://img.shields.io/docker/pulls/cybertecpostgresql/pg_timetable?label=Docker%20Pulls)](https://hub.docker.com/r/cybertecpostgresql/pg_timetable)
97
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)
108

119
# pg_timetable: Advanced scheduling for PostgreSQL

docs/README.rst

Lines changed: 0 additions & 120 deletions
This file was deleted.

docs/api.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# REST API
2+
3+
**pg_timetable** has a rich REST API, which can be used by external tools in order to perform start/stop/reinitialize/restarts/reloads,
4+
by any kind of tools to perform HTTP health checks, and of course, could also be used for monitoring.
5+
6+
Below you will find the list of **pg_timetable** REST API endpoints.
7+
8+
## Health check endpoints
9+
10+
### `GET /liveness`
11+
Always returns HTTP status code `200`, indicating that **pg_timetable** is running.
12+
13+
### `GET /readiness`
14+
Returns HTTP status code `200` when the **pg_timetable** is running, and the scheduler is in the main loop processing chains.
15+
If the scheduler connects to the database, creates the database schema, or upgrades it, it will return the HTTP status code `503`.
16+
17+
## Chain management endpoints
18+
19+
### `GET /startchain?id=<chain-id>`
20+
Returns HTTP status code `200` if the chain with the given id can be added to the worker queue. It doesn't, however, mean the chain execution starts immediately. It is up to the worker to perform load and other checks before starting the chain.
21+
In the case of an error, the HTTP status code `400` followed by an error message returned.
22+
23+
### `GET /stopchain?id=<chain-id>`
24+
Returns HTTP status code `200` if the chain with the given id is working at the moment and can be stopped. If the chain is running the
25+
cancel signal would be sent immediately.
26+
In the case of an error, the HTTP status code `400` followed by an error message returned.

docs/api.rst

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/background.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Project background
2+
3+
The pg_timetable project got started back in 2019 for internal scheduling needs at Cybertec.
4+
5+
For more background on the project motivations and design goals see the original series of blogposts announcing the project
6+
and the following feature updates.
7+
8+
Cybertec also provides commercial 9-to-5 and 24/7 support for pg_timetable.
9+
10+
* [Project announcement](https://www.cybertec-postgresql.com/en/pg_timetable-advanced-postgresql-job-scheduling/)
11+
12+
* [v2 released](https://www.cybertec-postgresql.com/en/pg_timetable-advanced-postgresql-cron-like-scheduler-released/)
13+
14+
* [Start-up improvements](https://www.cybertec-postgresql.com/en/pg_timetable-start-up-improvements/)
15+
16+
* [v3 released](https://www.cybertec-postgresql.com/en/pg_timetable-v3-is-out/)
17+
18+
* [Exclusive jobs explained](https://www.cybertec-postgresql.com/en/postgresql-exclusive-cron-jobs-using-pg_timetable-scheduler/)
19+
20+
* [Asynchronous chain execution](https://www.cybertec-postgresql.com/en/pg_timetable-asynchronous-chain-execution/)
21+
22+
* [v4 released](https://www.cybertec-postgresql.com/en/pg_timetable_v4-is-out/)
23+
24+
* [PostgreSQL schedulers: comparison table](https://www.cybertec-postgresql.com/en/postgresql-schedulers-comparison-table/)
25+
26+
## Project feedback
27+
28+
For feature requests or troubleshooting assistance please open an issue on project's [Github page](https://github.com/cybertec-postgresql/pg_timetable).

docs/background.rst

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)