Skip to content
Open
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: 19 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,38 @@ jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'


- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install

- name: Lint code
run: |
if [ -f "package.json" ] && grep -q '"lint"' package.json; then
yarn lint
else
echo "No lint script found, skipping..."
fi

- name: Type check
run: |
if [ -f "tsconfig.json" ]; then
npx tsc --noEmit
else
echo "No TypeScript config found, skipping type check..."
fi

- name: Build documentation
run: yarn build

- name: Test build output
run: |
if [ ! -d "build" ]; then
Expand All @@ -59,50 +58,50 @@ jobs:
name: Check Links
runs-on: ubuntu-latest
needs: build-and-test

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build site
run: yarn build

- name: Serve site and check links
run: |
# Install link checker
npm install -g broken-link-checker

# Start server in background
npx http-server build -p 3000 &
SERVER_PID=$!

# Wait for server to start
sleep 10

# Check internal links only
blc http://localhost:3000 --recursive --exclude-external || echo "Some links may be broken, please review"

# Kill server
kill $SERVER_PID


spell-check:
name: Spell Check
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Spell check
uses: streetsidesoftware/cspell-action@v6
with:
Expand Down