Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/linkcheck.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Linkcheck

on:
pull_request: # Temporarily test using PR, remove this before merge
branches:
- main
Comment on lines +4 to +6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the pull_request event you won't have any permissions for the github token, thus you can't create comments. At least not when the PR comes from a fork.

We'd need to create this PR's branch in the postgrest repo itself to be able to test it that way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd need to create this PR's branch in the postgrest repo itself to be able to test it that way.

If we are testing it that way, then I guess I should leave this for maintainers with write access on this repo.

schedule:
- cron: '1 2 * * 3'

permissions:
issues: write

jobs:
linkcheck:
runs-on: ubuntu-24.04
Expand All @@ -15,3 +21,15 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: docs.linkcheck.bin
- run: postgrest-docs-linkcheck

on-linkcheck-fail:
runs-on: ubuntu-latest
needs: linkcheck
if: ${{ always() && needs.linkcheck.result == 'failure' }}
Comment on lines +25 to +28
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not run a second job, but just a second step in the same job. Otherwise that first job will still fail causing another notification to whomever touched the scheduled workflow file last.

steps:
- name: Notify on linkcheck failure by commenting
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: 4106
body: |
❌ **Linkcheck Job Failed!**
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ Here are some companies that use PostgREST in production.
- See how Nimbus uses PostgREST in `Paul Copplestone's blog post <https://paul.copplest.one/blog/nimbus-tech-2019-04.html>`_.
* `OpenBooking <https://openbooking.ch>`_
* `Supabase <https://supabase.com>`_
* `Fake link <https://fake.postgrest.com>`_ .. TODD remove this before merge

Testimonials
------------
Expand Down
Loading