Skip to content

Content Creator

Content Creator #12

name: Content Creator
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
marketing-assets-gen:
name: Generate Social Media Content (IG · YT · TT)
runs-on: ubuntu-latest
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: npm install
# Sets Application Default Credentials (ADC) used by:
# - @google/genai (Vertex AI — Gemini, Imagen 3, Veo 3)
# - @google-cloud/storage (GCS asset upload)
- name: Google Cloud Auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Content Creator Script
env:
# ── Vertex AI ──────────────────────────────────────────
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
LOCATION: us-central1
GOOGLE_AI_API_KEY: ${{ secrets.GOOGLE_AI_API_KEY }} # fallback (API key mode)
# ── Additional AI APIs ─────────────────────────────────
NANO_BANANA_API_KEY: ${{ secrets.NANO_BANANA_API_KEY }}
VEO3_API_KEY: ${{ secrets.VEO3_API_KEY }}
# ── Buffer Social Publishing ───────────────────────────
# BUFFER_PROFILE_IDS: comma-separated in this exact ORDER:
# instagram_profile_id,youtube_profile_id,tiktok_profile_id
BUFFER_ACCESS_TOKEN: ${{ secrets.BUFFER_ACCESS_TOKEN }}
BUFFER_PROFILE_IDS: ${{ secrets.BUFFER_PROFILE_IDS }}
BUFFER_API: ${{ secrets.BUFFER_API }}
# ── Google Cloud Storage ───────────────────────────────
GCS_MARKETING_BUCKET: ${{ secrets.GCS_MARKETING_BUCKET }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
# ── Release Metadata (from GitHub Event) ───────────────
RELEASE_BODY: ${{ github.event.release.body }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
RELEASE_URL: ${{ github.event.release.html_url }}
run: node .github/scripts/content-creator.js
- name: Upload Pipeline Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: social-content-${{ github.event.release.tag_name || 'manual' }}
path: |
buffer-payload.json
*.png
*.mp4
retention-days: 30
if-no-files-found: ignore