Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/docs/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ AI_ASSISTANT_URL=
AI_API_ASSISTANT_TOKEN=
AI_WEBSITE_ID=
AI_API_ASSISTANT_RECAPTCHA_SITE_KEY=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_CLOUD_NAME=
GTAG_TRACKING_ID=
14 changes: 14 additions & 0 deletions apps/docs/content/features/coding-agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ import IntroAgentVisual from '@site/src/components/IntroAgentVisual';

Zerops was built on the idea of **environment parity** — giving developers the full development lifecycle, from remote development to highly available production, with the observability and developer tools for maximum flexibility, and sensible defaults so the configs stay reasonable. Turns out that's **exactly what coding agents need** to produce and iterate on production-ready applications.

<div className="w-full flex justify-center my-4">
<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/spdmTicsIgg?si=laZjTGhiytJRkqoJ"
title="YouTube video player"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerPolicy="strict-origin-when-cross-origin"
allowFullScreen
className="w-full max-w-[560px] aspect-video rounded-xl"
/>
</div>

<br/>

## What is it
Expand Down
45 changes: 38 additions & 7 deletions apps/docs/content/references/github-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,25 @@ As an alternative to direct integration, you can use GitHub Actions to manage yo
1. **Create Workflow Configuration**

Create a new file at `.github/workflows/deploy.yaml` in your repository:

Basic example:

```yaml
name: Deploy to Zerops

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Deploy with Zerops
uses: zeropsio/actions@main
with:
Expand All @@ -133,14 +133,14 @@ As an alternative to direct integration, you can use GitHub Actions to manage yo
```

Example with tag matching:

```yaml
name: Deploy to Zerops on Tag

on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+' # Example: v1.0.0, v2.3.4
- 'v[0-9]+\.[0-9]+\.[0-9]+' # Example: v1.0.0, v2.3.4

jobs:
deploy:
Expand Down Expand Up @@ -179,3 +179,34 @@ Keep your access token secure and never commit it directly to your repository. T
:::

For more information about GitHub Actions, refer to the [official GitHub Actions documentation](https://docs.github.com/en/actions).

---

## Advanced: Full Lifecycle Automation

:::tip Reference repository
A complete, working example of this pattern is available at [zerops-showcase-deploy](https://github.com/zeropsio/zerops-showcase-deploy), a deployment orchestrator built entirely on GitHub Actions and the Zerops API, no Zerops CLI required. Clone it as a starting point for your own multi-environment pipeline.
:::

The workflow above deploys a single service on push to one branch. This reference repo extends that into a full lifecycle: every feature branch gets its own isolated environment, every PR gets a preview, and stage and prod stay permanent with their data intact across deploys.

### What it sets up

| You do this | Pipeline creates | Lifetime |
| --------------------------- | -------------------------------------------------- | --------------------------- |
| Push to a feature branch | A full isolated environment | Until the branch is deleted |
| Open/update a PR to `stage` | A full isolated preview environment | Until the PR is closed |
| Merge a PR into `stage` | Redeploys app code to the shared stage environment | Permanent, data preserved |
| Push/merge to `main` | Redeploys app code to production | Permanent, data preserved |

Permanent environments keep their databases, caches, queues, and storage across every deploy, only the application code gets updated. Ephemeral environments are created from scratch and torn down automatically when no longer needed, so every developer gets their own isolated copy of the full stack without manual cleanup.

PR previews require a `stage` branch as the pull request target; the repo's setup guide covers creating it.

### How it differs from the basic workflow above

The basic GitHub Actions setup deploys one service to one Zerops project. This pattern manages entire **projects** programmatically instead: it checks whether a project for a given branch or PR already exists, creates one from an import template if not, and deploys to it. The key safeguard is that it never deletes or recreates infrastructure on permanent environments, only ephemeral ones get torn down. This is a reference implementation, not a Zerops-managed service, so you own the repo, the GitHub Actions minutes, and the Zerops API calls it makes on your behalf.

:::tip Full setup guide
Required secrets, customizing the project template for your own services, and the complete workflow reference are all covered in the [repo's README](https://github.com/zeropsio/zerops-showcase-deploy#readme).
:::
10 changes: 5 additions & 5 deletions apps/docs/content/zcp/concept/how-it-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ flowchart TD
reachability -->|needs human| blocker
behavior -->|needs human| blocker

classDef user fill:#f7fbff,stroke:#2d72d9,stroke-width:1.5px,color:#172033;
classDef zcpbox fill:#eef7f1,stroke:#32845a,stroke-width:1.5px,color:#172033;
classDef work fill:#fffaf0,stroke:#c47f17,stroke-width:1.5px,color:#172033;
classDef done fill:#f5f3ff,stroke:#7157d9,stroke-width:1.5px,color:#172033;
classDef stop fill:#fff1f2,stroke:#d33f49,stroke-width:1.5px,color:#172033;
classDef user stroke:#2d72d9,stroke-width:1.5px;
classDef zcpbox stroke:#32845a,stroke-width:1.5px;
classDef work stroke:#c47f17,stroke-width:1.5px;
classDef done stroke:#7157d9,stroke-width:1.5px;
classDef stop stroke:#d33f49,stroke-width:1.5px;

class intent user;
class state,scope zcpbox;
Expand Down
42 changes: 22 additions & 20 deletions apps/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import "dotenv/config"
import path from "path"
import { fileURLToPath } from "url"
import { themes as prismThemes } from "prism-react-renderer"
const reverseSidebar = require("./src/utils/reverse-sidebar")
const excludeSidebarResults = require("./src/utils/exclude-sidebar-results")

const __dirname = path.dirname(fileURLToPath(import.meta.url))

const gtagTrackingId = process.env.GTAG_TRACKING_ID

/** @type {import('@medusajs/docs').MedusaDocusaurusConfig} */
const config = {
title: "Zerops",
Expand Down Expand Up @@ -48,6 +54,14 @@ const config = {
name: "custom-webpack-plugin",
configureWebpack() {
return {
resolve: {
alias: {
"@docusaurus/theme-mermaid/client": path.resolve(
__dirname,
"src/mermaid/client.js"
),
},
},
devServer: {
client: {
overlay: {
Expand Down Expand Up @@ -78,23 +92,7 @@ const config = {
light: "base",
dark: "base",
},
options: {
themeVariables: {
background: "#ECEFF3",
mainBkg: "#ECEFF3",
primaryColor: "#ECEFF3",
primaryTextColor: "#030712",
primaryBorderColor: "#D1D5DB",
nodeBorder: "#D1D5DB",
lineColor: "#11181C",
fontFamily: "Inter",
fontSize: "14.75px",
tertiaryColor: "#F3F4F6",
tertiaryBorderColor: "#D1D5DB",
tertiaryTextColor: "#030712",
clusterBkg: "#F3F4F6",
},
},
options: {},
},
image: "img/docs-meta.jpg",
colorMode: {
Expand Down Expand Up @@ -250,9 +248,13 @@ const config = {
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
gtag: {
trackingID: "xxx",
},
...(gtagTrackingId
? {
gtag: {
trackingID: gtagTrackingId,
},
}
: {}),
sitemap: {
filename: "sitemap-docs.xml",
ignorePatterns: ["/guides/**"],
Expand Down
4 changes: 4 additions & 0 deletions apps/docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ module.exports = {
{
type: 'category',
label: 'Remote or local setup',
collapsed: true,
link: {
type: 'doc',
id: 'zcp/setup/choose-workspace',
Expand All @@ -657,6 +658,7 @@ module.exports = {
{
type: 'category',
label: 'Build and ship',
collapsed: true,
link: {
type: 'doc',
id: 'zcp/workflows/build-with-zcp',
Expand All @@ -681,6 +683,7 @@ module.exports = {
{
type: 'category',
label: 'Security',
collapsed: true,
link: {
type: 'doc',
id: 'zcp/security/trust-model',
Expand All @@ -705,6 +708,7 @@ module.exports = {
{
type: 'category',
label: 'Reference',
collapsed: true,
link: {
type: 'doc',
id: 'zcp/reference/index',
Expand Down
Loading
Loading