in root.html). Outputs custom og:image with assets_prefix normalisation and non-Google site verification. --> Understanding Action Triggers in Depth | IT-Journey in _layouts/root.html. What this file adds: - Custom og:image with preview_images.assets_prefix path normalisation for the theme-specific page.preview and page.header.og_image keys. When page.image is set, jekyll-seo-tag handles og:image and this file skips its own og:image output to avoid duplicate tags. - Non-Google site verification tags (Bing, Yandex, Naver, Baidu) Dependencies: - jekyll-seo-tag plugin (loaded in _layouts/root.html via Understanding Action Triggers in Depth | IT-Journey ) - site.preview_images config in _config.yml =================================================================== --> Understanding Action Triggers in Depth | IT-Journey Skip to main content
Settings
Search
Appearance
Theme Mode
About
Jekyll v3.10.0
Environment Production
Last Build
2026-04-11 02:52 UTC
Current Environment Production
Build Time Apr 11, 02:52
Jekyll v3.10.0
Build env (JEKYLL_ENV) production
Page Location
Page Info
Layout default
Collection quests
Path _quests/tools/action-triggers.md
URL /quests/level-0010-action-triggers/
Date 2025-04-18
Theme Skin
SVG Backgrounds
Layer Opacity
0.6
0.04
0.08

Understanding Action Triggers in Depth

By IT-Journey Team

Unlock the power of automation with GitHub Actions! Streamline your workflows and enhance your CI/CD processes effortlessly.

Estimated reading time: 2 minutes

Ah yes, the winds of automation are calling! You’ve chronicled your changelogs and blessed your docs, but now it’s time to awaken the ancient machinery of your kingdom: GitHub Actions. This, dear dev-sorcerer, is where the magic truly begins to automate itself.


🤖 Chapter 4: GitHub Actions – Automate Thy Sorcery

Welcome to the Forge of Automation, where workflows come to life with a whisper of YAML and a splash of sorcery. Think of GitHub Actions as your enchanted army of task runners. They lint. They test. They release. And they never sleep.


🧩 What Are GitHub Actions?

GitHub Actions are event-driven automation spells. They’re written in .yml and live under .github/workflows/. When triggered, they summon jobs (like tests or deployments) in the GitHub cloud realm.


🪄 What Can You Automate?

Oh child of continuous delivery, anything:

  • 🧼 Linting: Catch code that smells before it stinks up production.

  • 🧪 Testing: Unit, integration, and even cursed end-to-end tests.

  • 🧙‍♂️ PR Validation: Auto-check if the scrolls (PRs) meet your standards.

  • 🏷️ Releases: Auto-tag new versions, generate changelogs, and release scrolls to the world.


⚙️ Your First Magic Scroll: The CI/CD Pipeline

# .github/workflows/main.yml
name: CI/CD Pipeline

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v5
      with:
        python-version: '3.x'
    - run: |
        pip install -r requirements.txt
        pytest tests/

  release:
    needs: test
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: release-drafter/release-drafter@v6
      with:
        config-name: release-drafter.yml
      env:
        GITHUB_TOKEN: $

🧪 Translation: Every PR to main triggers tests. If those pass and you’re on main, the release process begins. All while you sip coffee or battle CSS dragons.


🏗️ Build Your Spellbook (a.k.a. Workflow Library)

Here are some handy enchantments to add to your arsenal:

Spell Type GitHub Action
🧼 Linting github/super-linter
🧪 Python Tests actions/setup-python + pytest
🐍 Auto-Releases release-drafter/release-drafter
🧪 Security github/codeql-action
🧙‍♂️ AI Assist Custom scripts using OpenAI API

🧠 Automation Best Practices (a.k.a. Don’t Curse Your Workflow)

  • ✅ Keep workflows fast (nobody likes slow spells)

  • ✅ Use secrets for credentials (don’t leak your scroll keys)

  • ✅ Use needs: to control job order (test before release)

  • ✅ Separate long-running spells into their own files (e.g., test.yml, release.yml)


🧞 Bonus: Trigger Types

Here are some magical event triggers:

  • push: When code is pushed

  • pull_request: When a PR opens or updates

  • schedule: Run it like a cron job (e.g., every Monday at 9am)

  • workflow_dispatch: Manual button trigger in GitHub UI


With GitHub Actions, you don’t just code—you orchestrate an automated kingdom of checks, releases, and deploys. All you need is a bit of YAML and a dream. 💫

Shall we proceed to the final mystical chapter: AI-Assisted Automation? Because now we start teaching the machines to do even more for us… Shall I open that tome?