Skip to content

Commit

Permalink
add: link checker job (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurFlag authored Oct 18, 2024
1 parent 348053c commit ef43930
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 13 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/link-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Links

on:
schedule:
- cron: '0 1 * * 4' # every Thursday, at 1AM
workflow_dispatch:

jobs:
check-links:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Muffet
run: |
sudo apt-get update
sudo apt-get install muffet
- name: Run check links
run: |
make check-links-logs
- name: Upload logs
uses: actions/upload-artifact@v3
with:
name: check-links-log
path: scripts/check_links.log
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# logs
check_links.log
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ cloud-list:

delete-unused-images:
node "$(SCRIPTS)/delete_unused_images.js"

check-links-logs:
sh "$(SCRIPTS)/check_links.sh" >> check_links.log

check-links:
sh "$(SCRIPTS)/check_links.sh"
6 changes: 3 additions & 3 deletions docs/platform/howto/byoc/create-custom-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ needs for accessing your GCP account only with permissions that are required.

:::note
Privilege-bearing service account (SA) is an
[identifier](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_service_account#id)
[identifier](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_service_account)
of the [service account](https://cloud.google.com/iam/docs/service-account-types#user-managed)
created when running the IaC template in your Google account. Aiven [impersonates this
service account](https://cloud.google.com/iam/docs/create-short-lived-credentials-direct)
Expand Down Expand Up @@ -600,10 +600,10 @@ view, copy, or download it. Now, you can use the template to
#### Deploy the template{#deploy-template}

Role ARN is an [identifier of the
role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles)
role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
created when running the infrastructure template in your AWS account.
Aiven uses Role ARN to [assume the
role](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole)
role](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html)
and run operations such as creating VMs for service nodes in your BYOC
account.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Before you begin, gather the necessary information about your source PostgreSQL
- `PG_PASSWORD`: The database password for the `PG_USER`
- `PG_DATABASE_NAME`: The database name
- `SSL_MODE`: The [SSL
mode](https://www.postgresql.org/docs/current/libpq-ssl)
mode](https://www.postgresql.org/docs/current/libpq-ssl.html)
- `PLUGIN_NAME`: The [logical decoding
plugin](https://debezium.io/documentation/reference/stable/connectors/postgresql.html),
possible values are `decoderbufs` and `pgoutput`.
Expand All @@ -35,7 +35,7 @@ Before you begin, gather the necessary information about your source PostgreSQL
`schema_name1.table_name1,schema_name2.table_name2`
- `PG_PUBLICATION_NAME`: The name of the [PostgreSQL logical
replication
publication](https://www.postgresql.org/docs/current/logical-replication-publication),
publication](https://www.postgresql.org/docs/current/logical-replication-publication.html),
if left empty, `debezium` is used as default
- `PG_SLOT_NAME`: name of the [PostgreSQL replication
slot](/docs/products/postgresql/howto/setup-logical-replication),
Expand Down
16 changes: 8 additions & 8 deletions docs/products/postgresql/reference/list-of-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ for more information.

## Geographical features

- [address_standardizer](https://postgis.net/docs/standardize_address).
- [address_standardizer](https://postgis.net/docs/standardize_address.html).
Used to parse an address into constituent elements. Generally used
to support geocoding address normalization step.
- [address_standardizer_data_us](https://postgis.net/docs/standardize_address).
- [address_standardizer_data_us](https://postgis.net/docs/standardize_address.html).
`Address standardizer` US dataset example.
- [earthdistance](https://www.postgresql.org/docs/current/earthdistance.html).
Calculate great-circle distances on the surface of the Earth.
Expand All @@ -95,13 +95,13 @@ for more information.
spatial types and functions.
- [postgis_legacy](https://postgis.net/). Legacy functions for
PostGIS.
- [postgis_raster](https://postgis.net/docs/RT_reference).
- [postgis_raster](https://postgis.net/docs/RT_reference.html).
PostGIS raster types and functions.
- [postgis_sfcgal](http://postgis.net/docs/reference#reference_sfcgal).
- [postgis_sfcgal](https://postgis.net/docs/reference_sfcgal.html).
PostGIS SFCGAL functions.
- [postgis_tiger_geocoder](https://postgis.net/docs/Extras#Tiger_Geocoder).
- [postgis_tiger_geocoder](https://postgis.net/docs/Extras.html#Tiger_Geocoder).
PostGIS tiger geocoder and reverse geocoder.
- [postgis_topology](https://postgis.net/docs/Topology). PostGIS
- [postgis_topology](https://postgis.net/docs/Topology.html). PostGIS
topology spatial types and functions.

## Procedural language
Expand Down Expand Up @@ -160,7 +160,7 @@ for more information.
Information about SSL certificates.
- [tablefunc](https://www.postgresql.org/docs/current/tablefunc.html).
Functions that manipulate whole tables, including `crosstab`.
- [timetravel](https://www.postgresql.org/docs/6.3/c0503.htm.html).
- [timetravel](https://www.postgresql.org/docs/6.3/c0503.htm).
Functions for implementing time travel.
`PG11 and earlier`
- [tsm_system_rows](https://www.postgresql.org/docs/current/tsm-system-rows.html).
Expand Down Expand Up @@ -188,7 +188,7 @@ not generally available**.
Functions for tracking who changed a table.
- [moddatetime](https://www.postgresql.org/docs/10/contrib-spi.html).
Functions for tracking last modification time.
- [old_snapshot](https://www.postgresql.org/docs/current/oldsnapshot.html).
- [old_snapshot](https://www.postgresql.org/docs/14/oldsnapshot.html).
Utilities in support of old_snapshot_threshold.
`PG14 only`
- [pageinspect](https://www.postgresql.org/docs/current/pageinspect.html).
Expand Down
36 changes: 36 additions & 0 deletions scripts/check_links.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

excludeList=(
"aiven.io/?!docs"
"aiven.io/docs/assets"
"aiven.io/docs/images"
"aiven.io/community"
"aiven.io/build"
".*cdn.sanity.io"
".*console.cloud.google.com"
".*docs.npmjs.com"
".*github.com"
".*linkedin.com"
".*maven.apache.org"
".*uptime.aiven.io"
".*docker.com"
".*php.net"
)

acceptedResponses="--accepted-status-codes=200..404"
address="https://aiven.io/docs/"
bufferSize="--buffer-size=8192"
limitConnections="--max-connections=9"
rateLimit="--rate-limit=30"
redirectionLimit="--max-redirections=5"
timeout="--timeout=4000"

muffet ${acceptedResponses} \
${bufferSize} \
${excludeList[@]/#/--exclude } \
${limitConnections} \
${rateLimit} \
${redirectionLimit} \
${timeout} \
"--color=always" \
${address};

0 comments on commit ef43930

Please sign in to comment.