Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a workflows to check for broken links #18

Merged
merged 1 commit into from
Sep 1, 2024
Merged
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
39 changes: 39 additions & 0 deletions .github/workflows/check-links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Check links

on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 18 * * *"

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
with:
args: './content.md'
jobSummary: false

- name: Find Link Checker Issue
id: link-checker-issue
uses: micalevisk/last-issue-action@v2
with:
state: open
labels: |
link-checker

- name: Update Issue
if: env.lychee_exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Broken links detected!
issue-number: "${{ steps.link-checker-issue.outputs.issue-number }}"
content-filepath: ./lychee/out.md
token: ${{secrets.GITHUB_TOKEN}}
labels: |
link-checker
18 changes: 18 additions & 0 deletions .github/workflows/check-pr-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check PR Links

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Link Checker
uses: lycheeverse/lychee-action@v1
with:
args: './content.md'
jobSummary: false
fail: true
8 changes: 4 additions & 4 deletions content.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ A collection of tools and resources to enhance your gameplay!
### Tablets
- [OpenTabletDriver](https://opentabletdriver.net/) - Open-source tablet driver
- **Kuuube's Tablet Sheets and Guides**
- [Kuuube's Tablet Buying Guide](https://docs.google.com/spreadsheets/d/1DYVfiSpQqdpa4sWWYUALPmliOIuGyKog7B7LJJdmlhE)
- [Kuuube's Wacom Tablet Mastersheet](https://docs.google.com/spreadsheets/d/125LNzGmidy1gagwYUt12tRhrNdrWFHhWon7kxWY7iWU)
- [Kuuube's Wacom Tablet Pen Compatibility Mastersheet](https://docs.google.com/spreadsheets/d/1UAFPjGj0ThthPBvOSVVwOm08HW3qWtVoP1iFBwLMyPI)
- [Kuuube's Tablet Buying Guide](https://docs.google.com/spreadsheets/d/1DYVfiSpQqdpa4sWWYUALPmliOIuGyKog7B7LJJdmlhE/edit)
- [Kuuube's Wacom Tablet Mastersheet](https://docs.google.com/spreadsheets/d/125LNzGmidy1gagwYUt12tRhrNdrWFHhWon7kxWY7iWU/edit)
- [Kuuube's Wacom Tablet Pen Compatibility Mastersheet](https://docs.google.com/spreadsheets/d/1UAFPjGj0ThthPBvOSVVwOm08HW3qWtVoP1iFBwLMyPI/edit)
- [Kuuube's Wacom Pen Nib Guide](https://kuuube.s-ul.eu/mSDcCpuh)
---
### Replay and Score Analysis
Expand Down Expand Up @@ -82,4 +82,4 @@ These are some of the bots that can be used in the in-game chat. Find the accoun
### Misc
- [osu!wiki](https://osu.ppy.sh/wiki/en/Main_page) - Tons of different articles about osu!
- [osu! discord communities](https://osu.ppy.sh/wiki/en/Community/Discord_servers#official-osu!-server) - List of various discord servers made by the osu! community
- [Shikke's Anti-Mindblock](https://shikkesora.com/downloads) - A tool to quickly flip your monitor upside to help with mindblock
- [Shikke's Anti-Mindblock](https://shikkesora.com/downloads) - A tool to quickly flip your monitor upside to help with mindblock
20 changes: 20 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
verbose = "debug"
no_progress = true
max_retries = 3

# Treat a redirect as a new resource and report an error
max_redirects = 0

# Some websites do not like bots, so we pretend to be a browser
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"

exclude = [
# Lychee reports an error when a link returns binary content
'https://kuuube.s-ul.eu/mSDcCpuh',

# YouTube seems to redirect for some reason
'www.youtube.com',

# Some websites do not like bots
'https://score.kirino.sh/',
]