@@ -2,6 +2,7 @@ name: 💅 Linting suite
22
33env :
44 HUSKY : 0
5+ NODE_VERSION : 20
56
67on :
78 pull_request :
3031 - name : Setup Node.js
3132 uses : actions/setup-node@v4
3233 with :
33- node-version : 20
34+ node-version : ${{ env.NODE_VERSION }}
3435 cache : " npm"
3536
3637 - name : Install dependencies
6263 echo
6364 npx remark --no-stdout --quiet --frail --silently-ignore $(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ')
6465
65- - name : ${{ steps.check-fmt.conclusion == 'failure' && '👀' }} How to fix the formatting? See these suggestions!
66+ - name : ${{ steps.check-fmt.conclusion == 'failure' && '👀 How to fix the formatting? See these suggestions!' || '...' }}
6667 env :
6768 ALL_CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
6869 if : failure()
9394 - name : Setup Node.js
9495 uses : actions/setup-node@v4
9596 with :
96- node-version : 20
97+ node-version : ${{ env.NODE_VERSION }}
9798 cache : " npm"
9899
99100 - name : Install dependencies
@@ -107,3 +108,41 @@ jobs:
107108 with :
108109 check_dot_files : explicit
109110 suggestions : true
111+
112+ redirects-check :
113+ name : " Redirects"
114+ runs-on : ubuntu-latest
115+ steps :
116+ - name : Checkout repository
117+ uses : actions/checkout@v4
118+ with :
119+ fetch-depth : 0
120+
121+ - name : Setup Node.js
122+ uses : actions/setup-node@v4
123+ with :
124+ node-version : ${{ env.NODE_VERSION }}
125+ cache : " npm"
126+
127+ - name : Install dependencies
128+ run : |
129+ corepack enable
130+ npm ci
131+
132+ - name : Check uniqueness of redirect sources in docs.json
133+ if : ${{ !cancelled() }}
134+ run : node scripts/check-redirects.mjs unique
135+
136+ - name : Check existence of redirect destinations in docs.json
137+ if : ${{ !cancelled() }}
138+ run : node scripts/check-redirects.mjs exist
139+
140+ - name : Check redirects against the previous TON Documentation
141+ if : ${{ !cancelled() }}
142+ run : node scripts/check-redirects.mjs previous
143+
144+ # NOTE: Re-enable before the release,
145+ # see: https://github.com/ton-org/docs/issues/39
146+ # - name: Check redirects against the upstream docs.json structure
147+ # if: ${{ !cancelled() }}
148+ # run: node scripts/check-redirects.mjs upstream
0 commit comments