Initial commit: Zero-Downtime Deployments on EKS #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 📚 Documentation Validation | |
| on: | |
| pull_request: | |
| paths: | |
| - '**.md' | |
| - 'docs/**' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '**.md' | |
| - 'docs/**' | |
| workflow_dispatch: | |
| jobs: | |
| markdown-lint: | |
| name: Lint Markdown Files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install markdownlint-cli | |
| run: npm install -g markdownlint-cli | |
| - name: Lint Markdown | |
| run: | | |
| markdownlint '**/*.md' \ | |
| --ignore node_modules \ | |
| --ignore .github \ | |
| || echo "::warning::Markdown lint warnings found" | |
| check-links: | |
| name: Check Documentation Links | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Check internal links | |
| uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
| with: | |
| use-quiet-mode: 'yes' | |
| config-file: '.github/markdown-link-check-config.json' | |
| spell-check: | |
| name: Spell Check Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run spell check | |
| uses: rojopolis/[email protected] | |
| with: | |
| config_path: .github/spellcheck-config.json | |
| task_name: Markdown | |
| continue-on-error: true | |
| doc-structure: | |
| name: Verify Documentation Structure | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Verify required files | |
| run: | | |
| echo "Checking for required documentation files..." | |
| REQUIRED_FILES=( | |
| "README.md" | |
| "LICENSE" | |
| "TECHNICAL_ARTICLE.md" | |
| "CLEANUP_VERIFICATION.md" | |
| "docs/QUICKSTART.md" | |
| "docs/COST_OPTIMIZATION.md" | |
| ".github/CONTRIBUTING.md" | |
| ".github/SECURITY.md" | |
| ) | |
| MISSING=0 | |
| for file in "${REQUIRED_FILES[@]}"; do | |
| if [ -f "$file" ]; then | |
| echo "✅ $file" | |
| else | |
| echo "❌ $file (missing)" | |
| MISSING=$((MISSING + 1)) | |
| fi | |
| done | |
| if [ $MISSING -gt 0 ]; then | |
| echo "::error::$MISSING required documentation file(s) missing" | |
| exit 1 | |
| fi | |
| echo "✅ All required documentation files present" | |
| - name: Check documentation size | |
| run: | | |
| echo "Checking documentation sizes..." | |
| README_SIZE=$(wc -c < README.md) | |
| ARTICLE_SIZE=$(wc -c < TECHNICAL_ARTICLE.md) | |
| echo "README.md: $README_SIZE bytes" | |
| echo "TECHNICAL_ARTICLE.md: $ARTICLE_SIZE bytes" | |
| if [ "$README_SIZE" -lt 1000 ]; then | |
| echo "::warning::README.md seems too small ($README_SIZE bytes)" | |
| fi | |
| if [ "$ARTICLE_SIZE" -lt 50000 ]; then | |
| echo "::warning::TECHNICAL_ARTICLE.md seems incomplete ($ARTICLE_SIZE bytes)" | |
| fi | |
| documentation-summary: | |
| name: Generate Documentation Summary | |
| runs-on: ubuntu-latest | |
| needs: [markdown-lint, doc-structure] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Generate summary | |
| run: | | |
| echo "# 📚 Documentation Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| File | Lines | Words | Size |" >> $GITHUB_STEP_SUMMARY | |
| echo "|------|-------|-------|------|" >> $GITHUB_STEP_SUMMARY | |
| for file in README.md TECHNICAL_ARTICLE.md CLEANUP_VERIFICATION.md docs/*.md; do | |
| if [ -f "$file" ]; then | |
| LINES=$(wc -l < "$file") | |
| WORDS=$(wc -w < "$file") | |
| SIZE=$(du -h "$file" | cut -f1) | |
| echo "| $file | $LINES | $WORDS | $SIZE |" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| done | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Documentation validation complete!" >> $GITHUB_STEP_SUMMARY |