CI/CD Guide

Automate social posts from your pipeline.

Post release notes on deploy, sync a content calendar from git, or announce merged PRs, all from GitHub Actions or any CI/CD system.

uses: agendapanda/post-action@v1Quick start

Quick start

Three steps to scheduled posting.

Get an API key, store it as a secret, add the action to your workflow. That's it.

1

Create an API key

Go to Settings and create an API key. It starts with ap_.

2

Add it as a GitHub secret

In your repo, go to Settings > Secrets and variables > Actions and add a secret named AP_API_KEY.

3

Add the action to your workflow

One step. One post. Runs in ~10 seconds.

.github/workflows/post.yml
- uses: agendapanda/post-action@v1
  with:
    api-key: ${{ secrets.AP_API_KEY }}
    content: 'We just shipped v2.0!'

Workflow examples

Copy, paste, ship.

Real workflow files you can drop into your repo. Each one is a complete, working example.

Post when you ship a release

Schedule a social announcement for every GitHub release.

.github/workflows/post-on-release.yml
name: Post on release
on:
  release:
    types: [published]

jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      - uses: agendapanda/post-action@v1
        with:
          api-key: ${{ secrets.AP_API_KEY }}
          content: |
            ${{ github.event.release.name }} is out!

            ${{ github.event.release.html_url }}

Post when a PR merges

Share shipped features as they land on main.

.github/workflows/post-on-merge.yml
name: Post on merge
on:
  pull_request:
    types: [closed]
    branches: [main]

jobs:
  post:
    if: github.event.pull_request.merged
    runs-on: ubuntu-latest
    steps:
      - uses: agendapanda/post-action@v1
        with:
          api-key: ${{ secrets.AP_API_KEY }}
          content: |
            Shipped: ${{ github.event.pull_request.title }}

            ${{ github.event.pull_request.html_url }}

Sync a calendar from your repo

Keep a calendar.json in git. Every push syncs it to your workspace: creates, updates, and deletes posts to match the file.

.github/workflows/sync-calendar.yml
name: Sync calendar
on:
  push:
    branches: [main]
    paths:
      - 'calendar.json'

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: agendapanda/post-action@v1
        with:
          api-key: ${{ secrets.AP_API_KEY }}
          calendar-file: './calendar.json'

Calendar as code

Your content schedule lives in git.

Store your content calendar as a JSON file in your repo. Review changes in Pull Requests, maintain full git history, and sync to your workspace on merge.

calendar.json
[
  {
    "external_id": "launch-post",
    "content": "We just launched v2.0! Check it out.",
    "connection": "x",
    "schedule": "2026-03-15T14:00:00Z"
  },
  {
    "external_id": "follow-up",
    "content": "Here's what's new in v2.0 and why it matters.",
    "connection": "linkedin",
    "schedule": "2026-03-16T10:00:00Z",
    "media": "https://example.com/og-image.png"
  }
]

Idempotent syncing

The external_id field links each JSON entry to a post. Run sync twice, get the same result. Safe to retry in CI.

Dry run first

Use ap calendar sync --file calendar.json --dry-run to preview what will be created, updated, or deleted before applying.

Calendar JSON fields

FieldRequiredDescription
external_idYesStable identifier for matching across syncs
contentYesPost text content
connectionYesConnection ID or platform name
scheduleYesUTC ISO 8601 with Z suffix
mediaNoURL or local file path for image/video

Without GitHub Actions

Works with any CI/CD system.

GitLab CI, CircleCI, Jenkins, Buildkite. Anything that runs a shell. Install the CLI, set your API key, post.

Any CI pipeline
# Install
curl -fsSL https://agendapanda.com/install.sh | bash

# Post immediately
AP_API_KEY=$AP_API_KEY ap post "Deployed v2.1.0 to production" --now

# Or sync a calendar file
AP_API_KEY=$AP_API_KEY ap calendar sync --file calendar.json --json

Environment variables

AP_API_KEY

API key (starts with ap_). Required for all CI/CD usage.required

AP_PROJECT

Project (workspace) ID. Auto-selects if you only have one.

AP_CONNECTION

Default connection ID or platform name. Auto-selects if you only have one.

AP_API_URL

Custom API endpoint. Defaults to agendapanda.com.

JSON output

All commands emit structured JSON when piped or with --json. Parse with jq or your language's JSON library.

Exit codes

Exit 0 on success, non-zero on failure. Your pipeline fails correctly if a post fails to publish.

Action reference

agendapanda/post-action@v1

Two modes: single post (set content) or calendar sync (set calendar-file). Cannot use both.

Inputs

InputRequiredDescription
api-keyYesAgenda Panda API key. Store as a repository secret.
contentNoPost content text. Required for single-post mode.
mediaNoPath to a media file (image or video) to attach.
connectionNoConnection ID or platform name (e.g. x, linkedin). Auto-selects if you only have one.
scheduleNoISO 8601 UTC datetime (e.g. 2026-03-01T14:00:00Z). Omit to post immediately.
calendar-fileNoPath to a calendar JSON file. Required for calendar sync mode.
projectNoProject (workspace) ID. Auto-selects if you only have one.

Outputs

OutputDescription
post-idID of the created post (single-post mode only)
resultFull JSON output from the CLI command
"Use Agenda Panda to build a review-ready launch calendar"

Start automating your social posts.

Just ask your AI agent to orchestrate the pipeline for you. Done.