GitHub Actions Workflows

This document provides comprehensive documentation for all GitHub Actions workflows in the IT-Journey repository.

Overview

The IT-Journey repository uses GitHub Actions for continuous integration, automated testing, content validation, and deployment. All workflows are located in .github/workflows/.

Workflow Summary

Workflow Trigger Purpose Status
Link Checker Schedule, Manual Validate links with AI analysis Active
Build Validation Push, PR Verify Jekyll builds successfully Active
Frontmatter Validation PR, Manual Validate content frontmatter Active
AI Content Review PR, Push AI-powered content quality review Active
Organize Posts Schedule, Manual Automated content organization Active
CodeQL Analysis Schedule, Push Security code scanning Active
Dependency Checker Schedule Check for outdated dependencies Active
Update Settings Manual Update repository settings Manual
Auto PR Manual Automated pull request creation Manual
Feature Request Manual Create feature request issues Manual

Active Workflows

File: .github/workflows/link-checker.yml

Purpose: Automated link validation with AI-powered analysis to maintain content quality.

Triggers:

Configuration Options:

scope:          # website, internal, external, docs, posts, quests, all
analysis_level: # basic, standard, comprehensive, ai-only  
create_issue:   # true/false - Create GitHub issue with results
ai_analysis:    # true/false - Enable AI-powered analysis
timeout:        # 10, 20, 30, 45, 60 seconds

Required Secrets:

Outputs:

Example Manual Trigger:

# Via GitHub CLI
gh workflow run link-checker.yml \
  -f scope=website \
  -f analysis_level=comprehensive \
  -f create_issue=true \
  -f ai_analysis=true \
  -f timeout=30

Workflow Steps:

  1. Checkout repository
  2. Setup Python 3.11
  3. Install dependencies (requests library)
  4. Run unified link-checker.py script
  5. Extract results for summary
  6. Archive results as artifacts
  7. Display workflow summary

See Also:

Build Validation

File: .github/workflows/build-validation.yml

Purpose: Ensure Jekyll builds successfully before merging changes.

Triggers:

Process:

  1. Checkout repository
  2. Setup Ruby 3.2.3
  3. Install Jekyll and dependencies
  4. Build site with Jekyll
  5. Check for build errors
  6. Report build status

Failure Scenarios:

Troubleshooting:

# Test locally before pushing
bundle exec jekyll build --verbose

# Check for configuration errors
bundle exec jekyll doctor

Frontmatter Validation

File: .github/workflows/frontmatter-validation.yml

Purpose: Validate and auto-fix frontmatter in markdown files.

Triggers:

Configuration Options:

apply_fixes: # true/false - Apply automatic fixes

Validated Fields:

Auto-Fix Capabilities:

Usage:

# Via GitHub Actions UI
Actions > Frontmatter Validation > Run workflow
# Select apply_fixes: true to apply fixes automatically

See Also: Frontmatter Standards

AI Content Review

File: .github/workflows/ai-content-review.yml

Purpose: AI-powered content quality analysis using GPT-4.

Triggers:

Required Secrets:

Review Criteria:

Output:

Quality Scores:

Cost Considerations: This workflow uses the OpenAI API and incurs costs. Monitor usage in the OpenAI dashboard.

Organize Posts Weekly

File: .github/workflows/organize-posts-weekly.yml

Purpose: Automated weekly organization of blog posts by categories.

Triggers:

Process:

  1. Run organization script
  2. Move posts to appropriate directories
  3. Update navigation if needed
  4. Commit changes (if any)

Script: scripts/development/content/organize-posts.py

CodeQL Analysis

File: .github/workflows/codeql-analysis.yml

Purpose: Automated security scanning for vulnerabilities.

Triggers:

Languages Analyzed:

Outputs:

Viewing Results:

Repository > Security > Code scanning alerts

Dependency Checker

File: .github/workflows/dependency-checker.yml

Purpose: Monitor for outdated or vulnerable dependencies.

Triggers:

Checks:

Actions Taken:

Manual Workflows

Update Settings

File: .github/workflows/update-settings.yml

Purpose: Update repository settings and configurations.

Trigger: Manual dispatch only

Uses: scripts/deployment/update-settings.sh

Auto PR

File: .github/workflows/auto-pr.yml

Purpose: Create automated pull requests for batch changes.

Trigger: Manual dispatch only

Use Cases:

Feature Request

File: .github/workflows/new-feature-request.yml

Purpose: Streamlined feature request creation.

Trigger: Manual dispatch with inputs

Inputs:

Workflow Best Practices

Secret Management

Required Secrets:

GITHUB_TOKEN        # Automatic, no setup needed
OPENAI_API_KEY     # For AI-powered features

Adding Secrets:

Repository > Settings > Secrets and Variables > Actions > New repository secret

Security:

Workflow Debugging

View Workflow Runs:

Repository > Actions > Select workflow > View run

Download Artifacts:

Workflow run > Artifacts section > Download

Re-run Failed Workflows:

Failed workflow run > Re-run jobs

Enable Debug Logging: Add repository secrets:

ACTIONS_STEP_DEBUG = true
ACTIONS_RUNNER_DEBUG = true

Performance Optimization

Caching: Workflows use caching for:

Timeout Settings: Most workflows have 45-minute timeout:

timeout-minutes: 45

Concurrency Control: Some workflows limit concurrent runs:

concurrency:
  group: $-$
  cancel-in-progress: true

Workflow Status and Monitoring

Status Badges

Add to README.md:

![Build Status](https://github.com/bamr87/it-journey/actions/workflows/build-validation.yml/badge.svg)
![Link Health](https://github.com/bamr87/it-journey/actions/workflows/link-checker.yml/badge.svg)

Notifications

Configure in:

Repository > Settings > Notifications

Options:

Workflow Run History

View past runs:

Actions > All workflows > Filter by status/branch/actor

Retention:

Troubleshooting

Common Issues

Issue: Workflow doesn’t trigger Solution:

Issue: Secrets not accessible Solution:

Issue: Build fails on specific step Solution:

Issue: Workflow times out Solution:

Getting Help

  1. Workflow Logs: Check detailed logs in Actions tab
  2. GitHub Docs: GitHub Actions Documentation
  3. Community: GitHub Community Forum
  4. Issues: Create repository issue with workflow logs

Workflow Development

Creating New Workflows

Template Structure:

name: Workflow Name

on:
  push:
    branches: [ main ]
  workflow_dispatch:

env:
  KEY: value

jobs:
  job-name:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      
      - name: Setup Environment
        # Setup steps
      
      - name: Run Task
        run: |
          # Commands
      
      - name: Upload Results
        uses: actions/upload-artifact@v4
        if: always()
        with:
          name: results
          path: output/

Testing Workflows

Local Testing:

# Install act (GitHub Actions local runner)
brew install act  # macOS
# or
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash

# Run workflow locally
act -W .github/workflows/workflow-name.yml

Branch Testing:

  1. Create feature branch
  2. Modify workflow file
  3. Push to trigger workflow
  4. Review results before merging

Workflow Permissions

Set appropriate permissions:

permissions:
  contents: read      # Read repository content
  issues: write       # Create/update issues
  pull-requests: write # Comment on PRs

Maintenance

Regular Tasks

Weekly:

Monthly:

Quarterly:

Updating Actions

Keep actions up to date:

# Check for updates
- uses: actions/checkout@v4  # Current
- uses: actions/setup-python@v5  # Current
- uses: actions/upload-artifact@v4  # Current

Use Dependabot to automate:

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"

Additional Resources


Last Updated: 2025-10-13
Version: 1.0.0