Skip to content

Commit

Permalink
Merge pull request #385 from nobkd/link-check
Browse files Browse the repository at this point in the history
test: check docs and READMEs links
  • Loading branch information
tipiirai authored Oct 29, 2024
2 parents cc971a8 + 4b5d484 commit 5e7ed12
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Check Links

on:
push:
branches:
- master
paths:
- '**/README.md'
- 'packages/nuejs.org/**'
pull_request:
paths:
- '**/README.md'
- 'packages/nuejs.org/**'
workflow_dispatch:

jobs:
links:
if: ${{ github.repository_owner == 'nuejs' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- name: Install and build docs
run: |
bun install
cd packages/nuekit
bun link
cd -
nue build -pr packages/nuejs.org
- name: Check links
if: success() || failure()
uses: lycheeverse/lychee-action@v2
with:
args: -v --no-progress --exclude-path node_modules --exclude localhost -- **/README.md packages/nuejs.org/.dist/prod/
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Test

on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion packages/nuekit/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Nue  [![test](https://github.com/nuejs/nue/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/nuejs/nue/actions/workflows/test.yaml)
# Nue  [![test status](https://github.com/nuejs/nue/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/nuejs/nue/actions/workflows/test.yaml) [![link checker status](https://github.com/nuejs/nue/actions/workflows/links.yaml/badge.svg?branch=master)](https://github.com/nuejs/nue/actions/workflows/links.yaml)

<a href="https://nuejs.org/">
<img src="https://nuejs.org/img/og-blue-big.png" width="900">
Expand Down

0 comments on commit 5e7ed12

Please sign in to comment.