Skip to main content

Detailed text description: GitHub preview deployment architecture

This page describes the GitHub preview deployment architecture diagram.

Overview

The diagram shows an automation flow where pull request events in GitHub trigger deployment lifecycle actions in Codesphere preview workspaces.

Main components

  1. GitHub repository:
  • Contains the source code and GitHub Actions workflow configuration.
  • Emits pull request events such as opened, synchronized, reopened, and closed.
  1. GitHub Actions workflow:
  • Runs on pull request events.
  • Uses repository secrets for Codesphere authentication.
  • Invokes the deployment action that communicates with Codesphere.
  1. Codesphere platform:
  • Receives deployment requests from the workflow.
  • Creates or updates a preview workspace tied to the pull request state.
  • Posts a deployment or preview link back to the pull request checks/status.
  1. Preview lifecycle handling:
  • On pull request open or update, preview environment is provisioned or refreshed.
  • On pull request close or merge, preview environment is shut down and removed.

Key takeaway

The architecture provides automated, per-pull-request preview environments by linking GitHub events to Codesphere deployment and cleanup operations.