diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml new file mode 100644 index 0000000..be3bf5b --- /dev/null +++ b/.github/workflows/doc-build.yml @@ -0,0 +1,50 @@ +name: Build pg_stat_monitor docs +on: + push: + branches: + - master + + +jobs: + build: + name: Deploy docs + runs-on: ubuntu-latest + + steps: + #Pull the latest changes + - name: Chekout code + uses: percona-platform/checkout@v2 + with: + fetch-depth: 0 + #Prepare the env + - name: Set up Python + uses: percona-platform/setup-python@v2 + with: + python-version: '3.x' + + #Configure git + - name: Configure git + env: + ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} + run: | + git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com" + git config user.name "GitHub Action" + git config user.email "github-action@users.noreply.github.com" + git config user.password "${ROBOT_TOKEN}" + echo "GIT_USER=percona-platform-robot:${ROBOT_TOKEN}" >> $GITHUB_ENV + + #Set up MkDocs + - name: Setup MkDocs + run: | + python -m pip install --upgrade pip + pip install wheel + if [ -f requirements-doc.txt ]; then pip install -r requirements-doc.txt; fi + + + # Deploy docs + - name: Deploy docs + run: | + mike deploy master -p + mike set-default master -p + mike retitle master "latest" -p + diff --git a/README.md b/README.md index eb6b689..fc09806 100644 --- a/README.md +++ b/README.md @@ -73,11 +73,11 @@ The `pg_stat_monitor` should work on the latest version of both [Percona Distrib ### Documentation -1. [User guide](https://github.com/percona/pg_stat_monitor/blob/master/docs/USER_GUIDE.md) -2. [Comparing `pg_stat_monitor` and `pg_stat_statements`](https://github.com/percona/pg_stat_monitor/blob/master/docs/COMPARISON.md) -3. [pg_stat_monitor view reference](https://github.com/percona/pg_stat_monitor/blob/master/docs/REFERENCE.md) -4. [Release notes](https://github.com/percona/pg_stat_monitor/blob/master/docs/RELEASE_NOTES.md) -5. [Contributing guide](https://github.com/percona/pg_stat_monitor/blob/master/CONTRIBUTING.md) +Find more information about `pg_stat_monitor` and its usage in the [`pg_stat_monitor` documentation](https://percona.github.io/pg_stat_monitor/master). + +Learn about recent improvements in the [release notes](https://nastena1606.github.io/pg_stat_monitor/master/RELEASE_NOTES.html) + +For how to contribute, see the [Contributing guide](https://github.com/percona/pg_stat_monitor/blob/master/CONTRIBUTING.md) ### Supported platforms @@ -227,7 +227,7 @@ You can download the source code of the latest release of `pg_stat_monitor` from ``` -git clone git://github.com/Percona/pg_stat_monitor.git +git clone git://github.com/percona/pg_stat_monitor.git ``` Compile and install the extension diff --git a/docs/index.md b/docs/index.md index 383448f..a76d36c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,7 @@ The **pg_stat_monitor** is a **_Query Performance Monitoring_** tool for Postgre * **Time Interval Grouping:** Instead of supplying one set of ever-increasing counts, `pg_stat_monitor` computes stats for a configured number of time intervals - time buckets. This allows for much better data accuracy, especially in the case of high resolution or unreliable networks. * **Multi-Dimensional Grouping:** While `pg_stat_statements` groups counters by userid, dbid, queryid, `pg_stat_monitor` uses a more detailed group for higher precision. This allows a user to drill down into the performance of queries. * **Capture Actual Parameters in the Queries:** `pg_stat_monitor` allows you to choose if you want to see queries with placeholders for parameters or actual parameter data. This simplifies debugging and analysis processes by enabling users to execute the same query. -* **Query Plan:** Each SQL is now accompanied by its actual plan that was constructed for its execution. That’s a huge advantage if you want to understand why a particular query is slower than expected. +* **Query Plan:** Each SQL is now accompanied by its actual plan that was constructed for its execution. That's a huge advantage if you want to understand why a particular query is slower than expected. * **Tables Access Statistics for a Statement:** This allows us to easily identify all queries that accessed a given table. This set is at par with the information provided by the `pg_stat_statements`. * **Histogram:** Visual representation is very helpful as it can help identify issues. With the help of the histogram function, one can now view a timing/calling data histogram in response to an SQL query. And yes, it even works in psql. @@ -28,8 +28,8 @@ The `pg_stat_monitor` should work on the latest version of both [Percona Distrib | **Distribution** | **Version** | **Provider** | | ---------------- | --------------- | ------------ | -|[Percona Distribution for PostgreSQL](https://www.percona.com/software/postgresql-distribution)| [11](https://www.percona.com/downloads/percona-postgresql-11/LATEST/), [12](https://www.percona.com/downloads/postgresql-distribution-12/LATEST/) and [13](https://www.percona.com/downloads/postgresql-distribution-13/LATEST/)| Percona| -| PostgreSQL | 11, 12, and 13 | PostgreSQL Global Development Group (PGDG) | +|[Percona Distribution for PostgreSQL](https://www.percona.com/software/postgresql-distribution)| [11](https://www.percona.com/downloads/percona-postgresql-11/LATEST/), [12](https://www.percona.com/downloads/postgresql-distribution-12/LATEST/), [13](https://www.percona.com/downloads/postgresql-distribution-13/LATEST/) and [14](https://www.percona.com/downloads/postgresql-distribution-14/LATEST/)| Percona| +| PostgreSQL | 11, 12, 13 and 14 | PostgreSQL Global Development Group (PGDG) | The RPM (for RHEL and CentOS) and the DEB (for Debian and Ubuntu) packages are available from Percona repositories for PostgreSQL versions [11](https://www.percona.com/downloads/percona-postgresql-11/LATEST/), [12](https://www.percona.com/downloads/postgresql-distribution-12/LATEST/), [13](https://www.percona.com/downloads/postgresql-distribution-13/LATEST/) and [14](https://www.percona.com/downloads/postgresql-distribution-14/LATEST/). diff --git a/docs/setup.md b/docs/setup.md index 2059104..aa991e3 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -34,11 +34,15 @@ percona-release setup ppgXX Replace XX with the desired PostgreSQL version. For example, to install `pg_stat_monitor ` for PostgreSQL 13, specify `ppg13`. 3. Install `pg_stat_monitor` package + * For Debian and Ubuntu: + ``` sh apt-get install percona-pg-stat-monitor13 ``` + * For RHEL and CentOS: + ``` sh yum install percona-pg-stat-monitor13 ``` diff --git a/mkdocs.yml b/mkdocs.yml index 6f1d447..48a8292 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -76,6 +76,11 @@ plugins: - git-revision-date - section-index # Adds links to nodes - comment out when creating PDF # - htmlproofer # Uncomment to check links - but extends build time significantly + - mike: + version_selector: true + css_dir: css + javascript_dir: js + canonical_version: null extra: diff --git a/requirements-doc.txt b/requirements-doc.txt new file mode 100644 index 0000000..d8dddb9 --- /dev/null +++ b/requirements-doc.txt @@ -0,0 +1,12 @@ +mkdocs +mkdocs-macros-plugin +mkdocs-exclude +markdown-include +mkdocs-material +mkdocs-with-pdf +mkdocs-git-revision-date-plugin +mkdocs-material-extensions +mkdocs-bootstrap-tables-plugin +mkdocs-section-index +mkdocs-htmlproofer-plugin +mike \ No newline at end of file