Skip to content

Content Creator

Content Creator #29

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 · FB)
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 24
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install Dependencies
run: npm install
# Sets Application Default Credentials (ADC) used by:
# - @google/genai (Vertex AI — Gemini 2.5 Pro, Imagen 3, Veo 3)
# - @google-cloud/storage (GCS public asset hosting)
- 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 }}
# ── Meta Graph API (Direct Publishing) ────────────────
META_ACCESS_TOKEN: ${{ secrets.META_ACCESS_TOKEN }} # Long-lived Page Access Token
IG_BUSINESS_ID: ${{ secrets.IG_BUSINESS_ID }} # Instagram Business Account ID
FB_PAGE_ID: ${{ secrets.FB_PAGE_ID }} # Facebook Page ID
APP_ID: ${{ secrets.APP_ID }} # Meta App ID
# ── 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/index.js
- name: Upload Pipeline Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: social-content-${{ github.event.release.tag_name || 'manual' }}
path: |
meta-payload.json
*.png
*.mp4
retention-days: 30
if-no-files-found: ignore