Skip to content
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
30 changes: 16 additions & 14 deletions .github/workflows/check-external-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,36 @@ jobs:
permissions:
issues: write
steps:
- uses: actions/checkout@v4
- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
key: cache-lychee-${{ hashFiles('lychee.toml') }}
restore-keys: cache-lychee-
- uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
lycheeVersion: "latest"
args: |
--cache
--verbose
--accept '100..=103,200..=299,400,403'
--base https://dev.flare.network/
--no-progress
--insecure
--exclude '^(/|https://dev\.flare\.network/|https?://localhost(?::[0-9]+)?/|https://fdc-verifiers-testnet\.flare\.network/|https://github\.com/flare-foundation/flare-hardhat-starter/|https://github\.com/flare-foundation/flare-foundry-starter/|https://sepolia\.etherscan\.io/|https://metamask\.io/|https://openweathermap\.org/|https://www\.gnu\.org/)'
--config lychee.toml
.
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Create Issue From File
- name: Comment on PR if broken links found
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@v5
uses: thollander/actions-comment-pull-request@v3
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue
message: |
### 🚨 Broken links detected
<details>
<summary>Click to expand</summary>

```markdown
${{ steps.lychee.outputs.report }}
```
</details>
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ yarn-error.log*

.vscode
.idea
.lycheecache

flare-smart-contracts-v2/
flare-smart-contracts/
Expand Down
18 changes: 18 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
base_url = "https://dev.flare.network/"
verbose = "info"
cache = true
accept = ["200", "429", "403"]
no_progress = true
exclude = [
'^/',
'https://dev\.flare\.network/',
'https?://localhost(?::[0-9]+)?/',
'https://fdc-verifiers-testnet\.flare\.network/',
'https://github\.com/flare-foundation/flare-hardhat-starter/',
'https://github\.com/flare-foundation/flare-foundry-starter/',
'https://sepolia\.etherscan\.io/',
'https://metamask\.io/',
'https://openweathermap\.org/',
'https://www\.gnu\.org/',
'https://swapi\.dev/',
]
Loading