Automating Jekyll Content Updates with GitHub Actions and Liquid Data

As your static site grows, managing and updating content manually becomes time-consuming. Whether you run a blog, documentation hub, or resource library built with Jekyll, small repetitive tasks like updating metadata, syncing data files, or refreshing pages can drain productivity. Fortunately, GitHub Actions combined with Liquid data structures can automate much of this process — allowing your Jekyll site to stay current with minimal effort.

Why Automate Jekyll Content Updates

Automation is one of the greatest strengths of the JAMstack. Since Jekyll sites are tightly integrated with GitHub, you can use continuous integration (CI) to perform actions automatically whenever content changes. This means that instead of manually building and deploying, you can have your site:

  • Rebuild and deploy automatically on every commit.
  • Sync or generate data-driven pages from structured files.
  • Fetch and update external data on a schedule.
  • Manage content contributions from multiple collaborators safely.

By combining GitHub Actions with Liquid data, your Jekyll workflow becomes both dynamic and self-updating — a key advantage for long-term maintenance.

Understanding the Role of Liquid Data Files

Liquid data files in Jekyll (located inside the _data directory) act as small databases that feed your site’s content dynamically. They can store structured data such as lists of team members, product catalogs, or event schedules. Instead of hardcoding content directly in markdown or HTML files, you can manage data in YAML, JSON, or CSV formats and render them dynamically using Liquid loops and filters.

Basic Data File Example

Suppose you have a data file _data/resources.yml containing:

- title: JAMstack Guide
  url: https://jamstack.org
  category: documentation
- title: Liquid Template Reference
  url: https://shopify.github.io/liquid/
  category: reference

You can loop through this data in your layout or page using Liquid:

{% for item in site.data.resources %}
  <li><a href="{{ item.url }}">{{ item.title }}</a> - {{ item.category }}</li>
{% endfor %}

Now imagine this data file updating automatically — new entries fetched from an external source, new tags added, and the page rebuilt — all without editing any markdown file manually. That’s the goal of automation.

How GitHub Actions Fits into the Workflow

GitHub Actions provides a flexible automation layer for any GitHub repository. It lets you trigger workflows when specific events occur (like commits or pull requests) or at scheduled intervals (e.g., daily). Combined with Jekyll, you can automate tasks such as:

  • Fetching data from external APIs and updating _data files.
  • Rebuilding the Jekyll site and deploying to GitHub Pages automatically.
  • Generating new posts or pages based on templates.

Basic Automation Workflow Example

Here’s a sample GitHub Actions configuration to rebuild your site daily and deploy it automatically:

name: Scheduled Jekyll Build
on:
  schedule:
    - cron: '0 3 * * *' # Run every day at 3AM UTC
jobs:
  build-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Setup Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.1
      - name: Install dependencies
        run: bundle install
      - name: Build site
        run: bundle exec jekyll build
      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./_site

This ensures your Jekyll site automatically refreshes, even if no manual edits occur — great for sites pulling external data or using automated content feeds.

Dynamic Data Updating via GitHub Actions

One powerful use of automation is fetching external data and writing it into Jekyll’s _data folder. This allows your site to stay up-to-date with third-party content, API responses, or public data sources.

Fetching External API Data

Let’s say you want to pull the latest GitHub repositories from your organization into a _data/repos.json file. You can use a small script and a GitHub Action to automate this:

name: Fetch GitHub Repositories
on:
  schedule:
    - cron: '0 4 * * *'
jobs:
  update-data:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Fetch GitHub Repos
        run: |
          curl https://api.github.com/orgs/your-org/repos?per_page=10 > _data/repos.json
      - name: Commit and push data changes
        run: |
          git config user.name "GitHub Action"
          git config user.email "[email protected]"
          git add _data/repos.json
          git commit -m "Auto-update repository data"
          git push

Each day, this Action will update your _data/repos.json file automatically. When the site rebuilds, Liquid loops render fresh repository data — providing real-time updates on a static website.

Using Liquid to Render Updated Data

Once the updated data is committed, Jekyll automatically includes it during the next build. You can display it in any layout or page using Liquid loops, just like static data. For example:

{% for repo in site.data.repos %}
  <div class="repo">
    <h3><a href="{{ repo.html_url }}">{{ repo.name }}</a></h3>
    <p>{{ repo.description | default: "No description available." }}</p>
  </div>
{% endfor %}

This transforms your static Jekyll site into a living portal that stays synchronized with external services automatically.

Combining Scheduled Automation with Manual Triggers

Sometimes you want a mix of automation and control. GitHub Actions supports both. You can run workflows on a schedule and also trigger them manually from the GitHub web interface using the workflow_dispatch event:

on:
  workflow_dispatch:
  schedule:
    - cron: '0 2 * * *'

This gives you the flexibility to trigger an update whenever you push new data or want to refresh content manually.

Organizing Your Repository for Automation

To make automation efficient and clean, structure your repository properly:

  • _data/ – for structured YAML, JSON, or CSV files.
  • _scripts/ – for custom fetch or update scripts (optional).
  • .github/workflows/ – for all GitHub Action files.

Keeping each function isolated ensures that your automation scales well as your site grows.

Example Workflow Comparison

The following table compares a manual Jekyll content update process with an automated GitHub Action workflow.

Task Manual Process Automated Process
Updating data files Edit YAML or JSON manually Auto-fetch via GitHub API
Rebuilding site Run build locally Triggered automatically on schedule
Deploying updates Push manually to Pages branch Deploy automatically via CI/CD

Practical Use Cases

Here are a few real-world applications for Jekyll automation workflows:

  • News aggregator: Fetch daily headlines via API and update _data/news.json.
  • Community site: Sync GitHub issues or discussions as blog entries.
  • Documentation portal: Pull and publish updates from multiple repositories.
  • Pricing or product pages: Sync product listings from a JSON API feed.

Benefits of Automated Jekyll Content Workflows

By combining Liquid’s rendering flexibility with GitHub Actions’ automation power, you gain several long-term benefits:

  • Reduced maintenance: No need to manually edit files for small content changes.
  • Data freshness: Automated updates ensure your site never shows outdated content.
  • Version control: Every update is tracked, auditable, and reversible.
  • Scalability: The more your site grows, the less manual work required.

Final Thoughts

Automation is the key to maintaining an efficient JAMstack workflow. With GitHub Actions handling updates and Liquid data files powering dynamic rendering, your Jekyll site can stay fresh, fast, and accurate — even without human intervention. By setting up smart automation workflows, you transform your static site into an intelligent system that updates itself, saving hours of manual effort while ensuring consistent performance and accuracy.

Next Steps

Start by identifying which parts of your Jekyll site rely on manual updates — such as blog indexes, API data, or navigation lists. Then, automate one of them using GitHub Actions. Once that works, expand your automation to handle content synchronization, build triggers, and deployment. Over time, you’ll have a fully autonomous static site that operates like a dynamic CMS — but with the simplicity, speed, and reliability of Jekyll and GitHub Pages.