From 98dceb37399b8f87f9118ac09c37749a3d69ec77 Mon Sep 17 00:00:00 2001 From: D V Date: Wed, 6 Mar 2024 10:44:02 +0530 Subject: [PATCH] add lychee --- .github/workflows/lychee.yml | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/lychee.yml diff --git a/.github/workflows/lychee.yml b/.github/workflows/lychee.yml new file mode 100644 index 000000000..cd0c9aaa9 --- /dev/null +++ b/.github/workflows/lychee.yml @@ -0,0 +1,51 @@ +name: Build and Check Links + +on: + push: + branches: + - main + + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build_and_serve: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Build Next.js App + run: yarn build + + - name: Serve App Locally + run: yarn start & + + - name: Wait for App to Start + run: sleep 20 + + linkChecker: + runs-on: ubuntu-latest + needs: build_and_serve + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Link Checker + uses: lycheeverse/lychee-action@v1.9.0 + with: + fail: true + args: '--base . --verbose --no-progress **/*.md'