Push To Display

Workflow Examples

Copy-paste recipes for common CI/CD scenarios.

Deploy notification

Send a message when a deploy finishes:

- uses: pushtodisplay/action@v1
  with:
    api-key: ${{ secrets.PTD_API_KEY }}
    board-id: ${{ vars.PTD_BOARD_ID }}
    text: "Deployed ${{ github.sha }} to production"

Styled deploy status

Use blocks for multi-line styled content:

- uses: pushtodisplay/action@v1
  with:
    api-key: ${{ secrets.PTD_API_KEY }}
    board-id: ${{ vars.PTD_BOARD_ID }}
    blocks: |
      [
        {
          "text": "Deploy completed",
          "size": "large",
          "weight": "bold",
          "color": "#E8FFF6",
          "background": "#0A4A36"
        },
        {
          "text": "${{ github.repository }} @ ${{ github.sha }}",
          "size": "small",
          "color": "#94A3B8"
        }
      ]
    background: "#0F172A"

Test results

Post test results to a specific panel:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run tests
        id: tests
        run: npm test

      - uses: pushtodisplay/action@v1
        if: always()
        with:
          api-key: ${{ secrets.PTD_API_KEY }}
          board-id: ${{ vars.PTD_BOARD_ID }}
          panel-id: "2"
          text: "Tests: ${{ steps.tests.outcome }}"

Build and notify pipeline

A full workflow that builds, tests, and sends status updates:

name: Build & Notify

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Build
        run: npm run build

      - name: Test
        run: npm test

      - name: Deploy
        run: ./deploy.sh

      - name: Notify success
        if: success()
        uses: pushtodisplay/action@v1
        with:
          api-key: ${{ secrets.PTD_API_KEY }}
          board-id: ${{ vars.PTD_BOARD_ID }}
          blocks: |
            [
              { "text": "✓ Build passed", "size": "large", "weight": "bold", "color": "#22C55E" },
              { "text": "${{ github.ref_name }} · ${{ github.actor }}", "size": "small", "color": "#94A3B8" }
            ]
          background: "#0F172A"

      - name: Notify failure
        if: failure()
        uses: pushtodisplay/action@v1
        with:
          api-key: ${{ secrets.PTD_API_KEY }}
          board-id: ${{ vars.PTD_BOARD_ID }}
          blocks: |
            [
              { "text": "✗ Build failed", "size": "large", "weight": "bold", "color": "#EF4444" },
              { "text": "${{ github.ref_name }} · ${{ github.actor }}", "size": "small", "color": "#94A3B8" }
            ]
          background: "#1E1014"

Multi-panel dashboard

Update different panels from separate workflow steps:

- name: Build status → Panel 1
  uses: pushtodisplay/action@v1
  with:
    api-key: ${{ secrets.PTD_API_KEY }}
    board-id: ${{ vars.PTD_BOARD_ID }}
    panel-id: "1"
    text: "Build: passing"
    density: compact

- name: Coverage → Panel 2
  uses: pushtodisplay/action@v1
  with:
    api-key: ${{ secrets.PTD_API_KEY }}
    board-id: ${{ vars.PTD_BOARD_ID }}
    panel-id: "2"
    text: "Coverage: 87%"
    density: compact

Using the message-id output

Capture the message ID for logging or downstream steps:

- uses: pushtodisplay/action@v1
  id: notify
  with:
    api-key: ${{ secrets.PTD_API_KEY }}
    text: "Processing started"

- name: Log message ID
  run: echo "Sent update ${{ steps.notify.outputs.message-id }}"