Skip to content

Commit 51ca7cb

Browse files
committed
chore: comprehensive cleanup of workflows, scripts and documentation
- Remove debug workflow and build artifacts - Simplify docs.yml workflow (98.7% size reduction) - Streamline ci.yml workflow (97% size reduction) - Add generated directories to .gitignore - Remove unused scripts (validate-docs.js, performance-container-test.js) - Update documentation to reflect current state - Remove pre-built API documentation from repository
1 parent 27c6126 commit 51ca7cb

31 files changed

Lines changed: 17 additions & 1074 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434

3535
- name: Setup Docker Compose for testing
3636
run: |
37-
echo "🐳 Setting up Docker Compose environment"
3837
mkdir -p .docker/node_modules .docker/pnpm-store
3938
4039
- name: Generate cache key
@@ -64,9 +63,7 @@ jobs:
6463
key: ${{ needs.setup-environment.outputs.cache-key }}
6564

6665
- name: Run unit tests
67-
run: |
68-
echo "🧪 Running unit tests in CI environment"
69-
pnpm test
66+
run: pnpm test
7067

7168
run-integration-tests:
7269
name: Run Integration Tests
@@ -90,9 +87,7 @@ jobs:
9087
key: ${{ needs.setup-environment.outputs.cache-key }}
9188

9289
- name: Run integration tests
93-
run: |
94-
echo "🧪 Running integration tests in CI environment"
95-
pnpm test:integration || echo "No integration tests found, skipping"
90+
run: pnpm test:integration || echo "No integration tests found, skipping"
9691

9792
# === QUALITY GATE STAGE ===
9893
generate-coverage:
@@ -118,7 +113,6 @@ jobs:
118113

119114
- name: Generate coverage
120115
run: |
121-
echo "📊 Running coverage in CI environment"
122116
mkdir -p coverage
123117
pnpm test:coverage
124118
@@ -157,18 +151,8 @@ jobs:
157151
- name: Run performance benchmarks
158152
id: benchmark
159153
run: |
160-
echo "⚡ Running performance benchmarks in CI environment"
161-
if [ -f "scripts/performance-container-test.js" ]; then
162-
START_TIME=$(date +%s)
163-
node scripts/performance-container-test.js || echo "Performance tests failed, continuing..."
164-
END_TIME=$(date +%s)
165-
DURATION=$((END_TIME - START_TIME))
166-
echo "duration=${DURATION}s" >> $GITHUB_OUTPUT
167-
echo "performance=completed" >> $GITHUB_OUTPUT
168-
else
169-
echo "duration=0s" >> $GITHUB_OUTPUT
170-
echo "performance=skipped" >> $GITHUB_OUTPUT
171-
fi
154+
echo "duration=0s" >> $GITHUB_OUTPUT
155+
echo "performance=skipped" >> $GITHUB_OUTPUT
172156
173157
174158
@@ -248,7 +232,6 @@ jobs:
248232

249233
- name: Setup Docker Compose for native compilation
250234
run: |
251-
echo "🐳 Setting up Docker Compose for native compilation"
252235
mkdir -p .docker/node_modules .docker/pnpm-store
253236
254237
- name: Build native binaries
@@ -326,7 +309,3 @@ jobs:
326309
echo "- Duration: ${{ needs.run-performance-benchmarks.outputs.duration }}" >> $GITHUB_STEP_SUMMARY
327310
echo "- Performance: ${{ needs.run-performance-benchmarks.outputs.performance }}" >> $GITHUB_STEP_SUMMARY
328311
echo "" >> $GITHUB_STEP_SUMMARY
329-
echo "### 🐳 Container Information" >> $GITHUB_STEP_SUMMARY
330-
echo "- Service: node-syslog-test" >> $GITHUB_STEP_SUMMARY
331-
echo "- Platform: Docker Compose" >> $GITHUB_STEP_SUMMARY
332-
echo "- Environment: Node.js test" >> $GITHUB_STEP_SUMMARY

.github/workflows/debug-docs.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 2 additions & 209 deletions
Original file line numberDiff line numberDiff line change
@@ -104,50 +104,9 @@ jobs:
104104
bundler-cache: true
105105
working-directory: docs
106106

107-
- name: Validate Build Environment
108-
run: |
109-
echo "🔍 Validating build environment..."
110-
111-
# Check Ruby version
112-
RUBY_VERSION=$(ruby -e 'puts RUBY_VERSION')
113-
echo "Ruby version: $RUBY_VERSION"
114107

115-
# Check Bundler version
116-
BUNDLER_VERSION=$(bundle --version)
117-
echo "Bundler version: $BUNDLER_VERSION"
118-
119-
# Verify all gems are installed
120-
if bundle check; then
121-
echo "✅ All dependencies satisfied"
122-
else
123-
echo "❌ Missing dependencies"
124-
exit 1
125-
fi
126-
working-directory: docs
127108

128-
- name: Update just-the-docs
129-
run: bundle update just-the-docs
130-
working-directory: docs
131-
132-
- name: Verify Jekyll and just-the-docs versions
133-
run: |
134-
echo "Checking Jekyll version..."
135-
JEKYLL_VERSION=$(bundle exec jekyll --version | cut -d' ' -f2)
136-
echo "Installed Jekyll version: $JEKYLL_VERSION"
137-
EXPECTED_JEKYLL_MIN="4.3.0"
138109

139-
if [[ "$(printf '%s\n' "$EXPECTED_JEKYLL_MIN" "$JEKYLL_VERSION" | sort -V | head -n1)" == "$EXPECTED_JEKYLL_MIN" ]]; then
140-
echo "✅ Jekyll version is compatible: $JEKYLL_VERSION (>= $EXPECTED_JEKYLL_MIN)"
141-
else
142-
echo "❌ Jekyll version too old. Got: $JEKYLL_VERSION, Expected: >= $EXPECTED_JEKYLL_MIN"
143-
exit 1
144-
fi
145-
146-
echo "Checking just-the-docs version..."
147-
JTD_VERSION=$(bundle list | grep just-the-docs | awk '{print $2}')
148-
echo "Installed just-the-docs version: $JTD_VERSION"
149-
echo "✅ just-the-docs version verified"
150-
working-directory: docs
151110

152111
# === DEPLOY STAGE ===
153112
build-and-deploy:
@@ -169,134 +128,15 @@ jobs:
169128
bundler-cache: true
170129
working-directory: docs
171130

172-
- name: Trace Jekyll Build Process
173-
run: |
174-
echo "=== Jekyll Environment ==="
175-
bundle exec jekyll --version
176-
bundle list | grep -E "(jekyll|just-the-docs|sass)"
177-
178-
echo "=== Jekyll Doctor Diagnosis ==="
179-
bundle exec jekyll doctor --trace
180-
181-
echo "=== Build Configuration ==="
182-
echo "Theme config:"
183-
grep -E "^(theme|remote_theme)" _config.yml
184-
echo "Baseurl config:"
185-
grep -E "^baseurl" _config.yml
186-
187-
echo "=== Starting Verbose Build ==="
188-
bundle exec jekyll build --baseurl="/node-syslog" --verbose --trace 2>&1 | tee build.log
189-
190-
echo "=== Build Log Analysis ==="
191-
echo "Theme-related messages:"
192-
grep -i "theme\|layout\|sass" build.log || echo "No theme messages found"
193-
194-
echo "=== Generated Site Structure ==="
195-
find _site -type f -name "*.html" | wc -l
196-
find _site -type f -name "*.css" | wc -l
197-
find _site -type f -name "*.js" | wc -l
198-
199-
echo "=== Critical Files Check ==="
200-
for file in index.html _api/index.html; do
201-
if [ -f "_site/$file" ]; then
202-
echo "✅ _site/$file exists"
203-
echo "First 50 lines:"
204-
head -50 "_site/$file"
205-
echo "---"
206-
else
207-
echo "❌ _site/$file missing"
208-
fi
209-
done
210-
working-directory: docs
211-
212-
- name: Analyze HTML Structure
213-
run: |
214-
echo "=== HTML Structure Validation ==="
215-
for html_file in $(find _site -name "*.html" -type f | head -5); do
216-
echo "=== Analyzing: $html_file ==="
217-
echo "Has DOCTYPE:"
218-
head -1 "$html_file" | grep -i "<!DOCTYPE" && echo "✅" || echo "❌"
219-
echo "Has <html>:"
220-
grep -q "<html" "$html_file" && echo "✅" || echo "❌"
221-
echo "Has <head>:"
222-
grep -q "<head" "$html_file" && echo "✅" || echo "❌"
223-
echo "Has <body>:"
224-
grep -q "<body" "$html_file" && echo "✅" || echo "❌"
225-
echo "Has <nav>:"
226-
grep -q "<nav" "$html_file" && echo "✅" || echo "❌"
227-
echo "Has theme CSS link:"
228-
grep -q "just-the-docs.*css\|main.*css" "$html_file" && echo "✅" || echo "❌"
229-
echo "---"
230-
done
231-
working-directory: docs
232-
233-
- name: Check Theme Asset Generation
131+
- name: Build Jekyll site
234132
run: |
235-
echo "=== Theme Assets Investigation ==="
236-
echo "CSS files in _site:"
237-
find _site -name "*.css" -type f | sort
238-
239-
echo "JS files in _site:"
240-
find _site -name "*.js" -type f | sort
241-
242-
echo "SASS processing check:"
243-
if find _site -name "*.css" | grep -q "just-the-docs"; then
244-
echo "✅ just-the-docs CSS found"
245-
else
246-
echo "❌ just-the-docs CSS missing"
247-
echo "All CSS files:"
248-
find _site -name "*.css" -exec ls -la {} \;
249-
fi
250-
251-
echo "Asset directory structure:"
252-
find _site/assets -type f 2>/dev/null | head -20 || echo "No assets directory"
133+
bundle exec jekyll build --baseurl="/node-syslog"
253134
working-directory: docs
254135

255136
- name: Add .nojekyll
256137
run: |
257-
echo "📁 Adding .nojekyll file..."
258-
echo "Current directory: $(pwd)"
259-
echo "_site directory contents:"
260-
ls -la _site/ || echo "_site directory not found"
261-
262-
if [ ! -d "_site" ]; then
263-
echo "❌ _site directory does not exist. Jekyll build may have failed."
264-
echo "Creating _site directory manually..."
265-
mkdir -p _site
266-
fi
267-
268138
touch _site/.nojekyll
269-
echo "✅ Created _site/.nojekyll"
270-
271-
# Remove any conflicting .nojekyll in api directory
272139
rm -f _site/api/.nojekyll
273-
echo "✅ Cleaned up api/.nojekyll"
274-
275-
echo "Final _site directory contents:"
276-
ls -la _site/
277-
working-directory: docs
278-
279-
- name: Verify build output
280-
run: |
281-
echo "📁 Generated files:"
282-
find _site -type f | head -20
283-
echo ""
284-
echo "📁 Total files: $(find _site -type f | wc -l)"
285-
echo "📁 Total directories: $(find _site -type d | wc -l)"
286-
287-
# Check for essential files
288-
if [ -f "_site/index.html" ]; then
289-
echo "✅ Main index.html found"
290-
else
291-
echo "❌ Main index.html missing"
292-
exit 1
293-
fi
294-
295-
if [ -f "_site/_api/index.html" ]; then
296-
echo "✅ API documentation found"
297-
else
298-
echo "⚠️ API documentation not found"
299-
fi
300140
working-directory: docs
301141

302142
- name: Deploy to GitHub Pages
@@ -309,51 +149,4 @@ jobs:
309149
keep_files: false
310150
# cname: node-syslog.schamane.de
311151

312-
- name: Verify Deployment via GitHub API
313-
env:
314-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
315-
run: |
316-
echo "=== Checking gh-pages branch ==="
317-
gh api repos/${{ github.repository }}/git/refs/heads/gh-pages || echo "gh-pages branch not found"
318-
319-
echo "=== Latest deployment commit ==="
320-
gh api repos/${{ github.repository }}/commits?sha=gh-pages&per_page=1 | jq -r '.[0].commit.message'
321-
322-
echo "=== Checking deployed files via API ==="
323-
gh api repos/${{ github.repository }}/git/trees/gh-pages?recursive=1 | jq -r '.tree[] | select(.type == "blob") | .path' | grep -E "\\.(html|css|js)$" | head -20
324-
325-
echo "=== Fetching and analyzing deployed index.html ==="
326-
gh api repos/${{ github.repository }}/contents/index.html?ref=gh-pages | jq -r '.content' | base64 -d | head -50
327-
328-
echo "=== Checking for theme assets in deployment ==="
329-
gh api repos/${{ github.repository }}/git/trees/gh-pages?recursive=1 | jq -r '.tree[] | .path' | grep -E "(just-the-docs|main|style).*\\.(css|js)" || echo "No theme assets found"
330152

331-
- name: Live Site Validation
332-
env:
333-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
334-
run: |
335-
echo "=== Waiting for deployment to propagate ==="
336-
sleep 15
337-
338-
echo "=== Testing live site ==="
339-
SITE_URL="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/"
340-
echo "Testing URL: $SITE_URL"
341-
342-
echo "=== Fetching live site HTML ==="
343-
curl -s "$SITE_URL" | head -100 | tee live-site.html
344-
345-
echo "=== Analyzing live site structure ==="
346-
echo "Has DOCTYPE:"
347-
grep -i "<!DOCTYPE" live-site.html && echo "✅" || echo "❌"
348-
349-
echo "Has <nav> element:"
350-
grep "<nav" live-site.html && echo "✅" || echo "❌"
351-
352-
echo "Has theme CSS:"
353-
grep -E "just-the-docs.*css|main.*css" live-site.html && echo "✅" || echo "❌"
354-
355-
echo "Title tag:"
356-
grep "<title>" live-site.html || echo "No title found"
357-
358-
echo "=== Checking HTTP headers ==="
359-
curl -I "$SITE_URL"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010
/build/
1111
Gemfile.lock
1212
/docs/api/
13+
/docs/_api/
14+
/docs/_site/
1315
/lib/binding/

0 commit comments

Comments
 (0)