↑ top
← Back to blog
EN | ES

Automating Post Publishing from a Mobile Device with GitHub Actions

How I publish blog posts from my phone without touching a laptop — using GitHub Actions, Cloudflare Workers, and a CI pipeline that handles everything automatically.

✦ AI Summary

The solution to static site generators assumes you have a terminal open. I wanted the opposite: write a Markdown file, add an image, open a pull request, merge it — and have everything else happen automatically from anywhere, including a phone.

Automating Post Publishing from a Mobile Device with GitHub Actions

The previous posts covered building this site on Cloudflare Workers and adding a custom domain. The natural next question was: can I publish a new post from my phone without a laptop nearby?

The answer turned out to be yes — and the solution required zero new tools.

The Problem with Traditional Workflows

Most static site generators assume you have a terminal open. You write the post, run a build command, deploy, commit the artifacts. Even with CI, you typically need to at least run something locally before pushing.

I wanted the opposite: write a Markdown file, add an image, open a pull request, merge it — and have everything else happen automatically. From anywhere, including a phone.

What the Pipeline Does

When a PR with changes to posts/** or images/** is merged to main, the CI pipeline runs npm run publish, which does four things in sequence:

  1. Reads the new post files from posts/ and parses their frontmatter
  2. Compresses the hero images from any format (PNG, JPG, WebP) to WebP at 80% quality, max 1200px wide — a 5MB PNG becomes ~100KB
  3. Uploads the compressed images to Cloudflare R2 and deletes the originals from the repo
  4. Rebuilds kv-seed.json and seeds Cloudflare KV with the updated post index and content

After that, a bot commits the generated artifacts (kv-seed.json, updated frontmatter with image: true) back to main with [skip ci] to avoid an infinite loop.

The worker picks up the new KV data on the next request — no deployment needed. Posts go live within 30 seconds of merge.

The Mobile Workflow

With this pipeline in place, publishing from a phone looks like this:

  1. Write the post — in the GitHub mobile app, create a new file at posts/my-post.md directly in a branch
  2. Add the image — upload the hero image to images/my-post.jpg in the same branch
  3. Open a PR — GitHub mobile handles this natively
  4. Merge — one tap, CI takes over

No terminal. No SSH. No laptop. The entire publishing flow fits in a phone screen.

The Manual Trigger

For cases where you want to re-run the pipeline without a new commit — re-seeding KV after a manual edit, re-deploying the worker, testing the pipeline — I added workflow_dispatch to the CI configuration:

yamlon:
  push:
    branches:
      - main
    paths:
      - "posts/**"
      - "images/**"
      - "src/**"
      - "scripts/**"
      - "static/**"
  workflow_dispatch:

This adds a "Run workflow" button in the GitHub Actions tab, accessible from the GitHub mobile app. One tap to trigger the full pipeline manually.

Assisted Publishing with Claude

The workflow I actually use most often goes one step further: I don't write the posts manually either.

  1. Open a Claude Code session from the web or mobile
  2. Describe the topic — Claude writes both the English and Spanish versions
  3. Upload the hero images to Google Drive
  4. Tell Claude the images are ready — it downloads them via the Drive API, commits posts and images to a branch, and merges the PR
  5. CI handles everything else

The entire flow from "I want to write about X" to "post is live" takes about 10 minutes and requires no local setup.

The Underlying Insight

The key realization is that CI pipelines are not just for deploying code — they can be the runtime for any automated task. Image compression, content processing, cache invalidation, artifact generation: all of this can live in a pipeline triggered by a git push.

Once the pipeline exists, the publishing interface becomes anything that can make a commit. A terminal, a phone, a web editor, an AI agent — it doesn't matter. The pipeline handles the rest.

That flexibility is worth more than any publishing UI.

Was this helpful?