Skip to content

fix: ci checks #1990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: source
Choose a base branch
from
Open
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
120 changes: 72 additions & 48 deletions .github/workflows/docs-validation.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,88 @@
# Docs validation workflow runs on each PR on main w/ broken link checker
# and code snippet validation

name: Docs validation

on:
pull_request:
branches:
- main
push:
branches:
- main
on: pull_request

jobs:
link-check:
name: Broken link checker
runs-on: ubuntu-latest
prettier-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
packageManager: pnpm
workingDirectory: ./

- name: Install Dependencies
run: pnpm i

- name: Run Prettier Check
run: pnpm format:check

link-check:
name: Broken link checker
runs-on: ubuntu-latest

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

- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
packageManager: pnpm
workingDirectory: ./

- name: Install Dependencies
run: pnpm i

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build static site
run: pnpm build

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install lychee
run: cargo install lychee

- name: Build static site
run: pnpm build
- name: Check links
run: lychee --verbose --no-progress './out/**/*.html'

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install lychee
run: cargo install lychee
- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
packageManager: pnpm
workingDirectory: ./

- name: Check links
run: lychee --verbose --no-progress './out/**/*.html'
- name: Install Dependencies
run: pnpm i

code-validate:
name: Code snippet and GraphQL validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run linting
run: pnpm lint:docs

- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
code-validate:
name: Snippet validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile
- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
packageManager: pnpm
workingDirectory: ./

- name: Run validation w/ annotations
run: pnpm lint:docs:ci
- name: Install Dependencies
run: pnpm i

- name: Validate code snippets
run: pnpm validate:snippets
- name: Validate code snippets
run: pnpm validate:snippets
20 changes: 0 additions & 20 deletions .github/workflows/prettier.yml

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"format": "pnpm format:check --write",
"format:check": "prettier --cache --check .",
"lint": "eslint --ignore-path .gitignore .",
"lint:docs": "eslint --ignore-path .gitignore src/pages/learn --format stylish",
"lint:docs:ci": "eslint --ignore-path .gitignore src/pages/learn --format eslint-formatter-github",
"lint:docs": "eslint --ignore-path .gitignore src/pages/learn",
"postbuild": "next-sitemap",
"prebuild": "tsx src/get-github-info.ts",
"start": "next start",
Expand Down Expand Up @@ -74,10 +73,12 @@
"@types/string-similarity": "^4.0.2",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"chalk": "^5.4.1",
"eslint": "8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-tailwindcss": "3.17.5",
"glob": "^11.0.2",
"prettier": "3.4.2",
"prettier-plugin-pkg": "^0.18.1",
"prettier-plugin-tailwindcss": "^0.6.9",
Expand Down
76 changes: 55 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading