Skip to content
Merged
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
45 changes: 42 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: 💅 Linting suite

env:
HUSKY: 0
NODE_VERSION: 20

on:
pull_request:
Expand Down Expand Up @@ -30,7 +31,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ env.NODE_VERSION }}
cache: "npm"

- name: Install dependencies
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:
echo
npx remark --no-stdout --quiet --frail --silently-ignore $(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ')

- name: ${{ steps.check-fmt.conclusion == 'failure' && '👀' }} How to fix the formatting? See these suggestions!
- name: ${{ steps.check-fmt.conclusion == 'failure' && '👀 How to fix the formatting? See these suggestions!' || '...' }}
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
if: failure()
Expand Down Expand Up @@ -93,7 +94,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ env.NODE_VERSION }}
cache: "npm"

- name: Install dependencies
Expand All @@ -107,3 +108,41 @@ jobs:
with:
check_dot_files: explicit
suggestions: true

redirects-check:
name: "Redirects"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"

- name: Install dependencies
run: |
corepack enable
npm ci

- name: Check uniqueness of redirect sources in docs.json
if: ${{ !cancelled() }}
run: node scripts/check-redirects.mjs unique

- name: Check existence of redirect destinations in docs.json
if: ${{ !cancelled() }}
run: node scripts/check-redirects.mjs exist

- name: Check redirects against the previous TON Documentation
if: ${{ !cancelled() }}
run: node scripts/check-redirects.mjs previous

# NOTE: Re-enable before the release,
# see: https://github.com/ton-org/docs/issues/39
# - name: Check redirects against the upstream docs.json structure
# if: ${{ !cancelled() }}
# run: node scripts/check-redirects.mjs upstream
Loading