-
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (87 loc) · 2.58 KB
/
docs.yml
File metadata and controls
106 lines (87 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Generate and Deploy Documentation
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
release:
types: [ published ]
jobs:
# Single documentation generation job
generate-docs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Generate documentation
run: npm run docs
- name: Upload documentation artifacts
uses: actions/upload-artifact@v5
with:
name: documentation
path: docs/
retention-days: 30
# Quality checks using generated documentation
docs-quality:
needs: generate-docs
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Download generated documentation
uses: actions/download-artifact@v6
with:
name: documentation
path: docs/
- name: Check for broken links
run: |
# Install link checker
npm install -g linkinator
# Check generated documentation, skipping LinkedIn which often returns 429
linkinator docs/ --recurse --silent --skip "https://www.linkedin.com/in/vadim-starichkov/"
- name: Validate JSDoc coverage
run: |
# Custom script to check documentation coverage
node scripts/check-docs-coverage.js
# Deploy to GitHub Pages using generated documentation
deploy-docs:
needs: [ generate-docs, docs-quality ]
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
# Required for GitHub Pages deployment
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download generated documentation
uses: actions/download-artifact@v6
with:
name: documentation
path: docs/
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v4
with:
path: docs/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4