# windmill-labs/windmill-sync-example architecture

> Architecture diagram of the GitHub repository windmill-labs/windmill-sync-example, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/windmill-labs/windmill-sync-example
- Repository: https://github.com/windmill-labs/windmill-sync-example

## Overview

This repository is a Windmill-to-GitHub deployment example, not an application runtime. Its principal workflow is: a user deploys a Windmill asset to staging, Windmill commits it on a per-asset branch, GitHub Actions opens a pull request for review, and a merge triggers deployment to production. The tree contains representative Windmill assets under `f/`; the README documents the sync and deployment behavior. The action files are included because they implement that workflow. Asset-to-asset runtime behavior is not established by the sampled scripts.

Main entry points: [`.github/workflows/push-on-merge.yaml`](https://github.com/windmill-labs/windmill-sync-example/blob/main/.github/workflows/push-on-merge.yaml) (Push on merge action), [`.github/workflows/open-pr-on-commit.yaml`](https://github.com/windmill-labs/windmill-sync-example/blob/main/.github/workflows/open-pr-on-commit.yaml) (Open PR action), [`f`](https://github.com/windmill-labs/windmill-sync-example/tree/main/f) (Scripts, flows, apps)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sync["Staging Sync"]
  node_staging["Staging workspace"]
  node_repo["GitHub repository"]
end

subgraph group_review["Review"]
  node_github["GitHub"]
  node_open_pr["Open PR action"]
  node_reviewers(("Approved reviewers"))
end

subgraph group_release["Production Release"]
  node_push_merge["Push on merge action<br/>[push-on-merge.yaml]"]
  node_production["Production workspace"]
end

subgraph group_assets["Windmill Assets"]
  node_assets["Scripts, flows, apps"]
end

node_user(("Windmill user"))

node_user -->|"deploys asset"| node_staging
node_staging -->|"commits branch"| node_repo
node_repo -->|"stores assets"| node_assets
node_github -->|"triggers on branch"| node_open_pr
node_open_pr -->|"creates pull request"| node_github
node_reviewers -->|"review and merge"| node_github
node_github -->|"triggers on merge"| node_push_merge
node_push_merge -->|"reads content"| node_repo
node_push_merge -->|"deploys content"| node_production

click node_assets "https://github.com/windmill-labs/windmill-sync-example/tree/main/f"
click node_open_pr "https://github.com/windmill-labs/windmill-sync-example/blob/main/.github/workflows/open-pr-on-commit.yaml"
click node_push_merge "https://github.com/windmill-labs/windmill-sync-example/blob/main/.github/workflows/push-on-merge.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_staging,node_repo,node_user toneBlue
class node_github,node_open_pr,node_reviewers toneAmber
class node_push_merge,node_production toneMint
class node_assets toneRose
```

## Components

### Staging Sync

- **Staging workspace**
- **GitHub repository**

### Review

- **GitHub**
- [Open PR action](https://github.com/windmill-labs/windmill-sync-example/blob/main/.github/workflows/open-pr-on-commit.yaml): `.github/workflows/open-pr-on-commit.yaml`
- **Approved reviewers**

### Production Release

- [Push on merge action](https://github.com/windmill-labs/windmill-sync-example/blob/main/.github/workflows/push-on-merge.yaml): `.github/workflows/push-on-merge.yaml`
- **Production workspace**

### Windmill Assets

- [Scripts, flows, apps](https://github.com/windmill-labs/windmill-sync-example/tree/main/f): `f`

### Other components

- **Windmill user**

## Connections

- Windmill user → Staging workspace: deploys asset
- Staging workspace → GitHub repository: commits branch
- GitHub repository → Scripts, flows, apps: stores assets
- GitHub → Open PR action: triggers on branch
- Open PR action → GitHub: creates pull request
- Approved reviewers → GitHub: review and merge
- GitHub → Push on merge action: triggers on merge
- Push on merge action → GitHub repository: reads content
- Push on merge action → Production workspace: deploys content
