Skip to content

just a lil test

just a lil test #15

name: Check for broken links
on:
workflow_dispatch:
pull_request:
types: [opened, reopened]
schedule:
- cron: '0 17 * * 0' # 9AM PST (5PM UTC) on Sunday mornings
env:
BOT_NAME: svc-docs-eng-opensource-bot
BOT_EMAIL: svc-docs-eng-opensource-bot@newrelic.com
jobs:
check-links:
name: Check for broken links
runs-on: ubuntu-latest
outputs:
broken-links: ${{ steps.check-changes.broken-links }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: liz/link-check
persist-credentials: false
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Check links
run: echo "broken-links=$(scripts/actions/check-links/check-links.sh)" >> $GITHUB_OUTPUT
id: check-links
create_issue:
name: Create broken link issue
needs: check-links
if: ${{needs.check-links.outputs.broken-links}} !== ""
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create broken link issue
run: |
gh issue create \
--title "Broken link(s) found" \
--body ${{needs.check-links.outputs.broken-links}}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}