You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/src/content/docs/explainer/default/en/deployment/ci-cd.mdx
+76-44Lines changed: 76 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,90 +7,122 @@ order: 5
7
7
8
8
# CI/CD
9
9
10
-
Explainer uses GitHub Actions for continuous deployment. Each app has its own workflow file with path-based triggers and a shared deployment pattern.
10
+
Explainer uses a single GitHub Actions workflow for continuous deployment. All three apps (Docs, Blog, Website) are managed in one unified workflow with smart change detection.
|`.github/workflows/deploy.yml`| Docs, Blog, Website |`push` to `main`, `workflow_dispatch`|
19
17
20
-
All workflows also trigger on `workflow_dispatch` for manual deployments.
18
+
## Trigger modes
21
19
22
-
## Trigger patterns
20
+
The workflow supports two trigger modes:
23
21
24
-
Workflows trigger on push to `main` with path filters:
22
+
-**Push to `main`** — only builds and deploys apps affected by the changed files (path-based filtering)
23
+
-**Manual (`workflow_dispatch`)** — allows selecting which apps to deploy via checkboxes
25
24
26
25
```yaml
27
26
on:
28
27
push:
29
28
branches: [main]
30
-
paths:
31
-
- 'apps/docs/**'
32
-
- 'packages/**'
33
29
workflow_dispatch:
30
+
inputs:
31
+
docs:
32
+
description: 'Deploy Docs'
33
+
type: boolean
34
+
default: true
35
+
blog:
36
+
description: 'Deploy Blog'
37
+
type: boolean
38
+
default: true
39
+
website:
40
+
description: 'Deploy Website'
41
+
type: boolean
42
+
default: true
34
43
```
35
44
36
-
:::callout{variant="info"}
37
-
Changes to `packages/**` trigger **all** app workflows. This is intentional — shared packages like `@explainer/ui` or `@explainer/mdx` affect all apps, so they all need to be rebuilt and deployed.
38
-
:::
45
+
## Change detection
39
46
40
-
## DEPLOY_TARGET pattern
47
+
A `changes` job uses `dorny/paths-filter` to detect which apps need rebuilding:
41
48
42
-
Each workflow uses a repository variable `DEPLOY_TARGET` to select the deployment platform:
Set `DEPLOY_TARGET` once in your repository variables and the correct deployment job runs automatically.
55
+
:::callout{variant="info"}
56
+
Changes to `packages/**` trigger **all** app builds. This is intentional — shared packages like `@explainer/ui` or `@explainer/mdx` affect all apps, so they all need to be rebuilt and deployed.
57
+
:::
60
58
61
-
## Build job
59
+
## Build and deploy pattern
62
60
63
-
All workflows share a common build step:
61
+
Each app follows a two-stage pattern: **build** then **deploy**. Build jobs run in parallel when multiple apps are affected.
All three `PUBLIC_*` variables are passed to every app build. This ensures navbar links between apps always point to the correct URLs, regardless of the deployment platform.
Copy file name to clipboardExpand all lines: apps/docs/src/content/docs/explainer/default/en/deployment/cloudflare.mdx
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,17 +36,16 @@ Create a Pages project in the Cloudflare dashboard for each app you want to depl
36
36
37
37
## GitHub Actions workflow
38
38
39
-
When `DEPLOY_TARGET` is set to `cloudflare`, the workflow uses the wrangler action:
39
+
The unified workflow at `.github/workflows/deploy.yml` handles all three apps. When `DEPLOY_TARGET` is set to `cloudflare`, the deploy job uses the wrangler action:
Replace `explainer-docs` with your Cloudflare Pages project name. Each app needs its own project.
50
+
Replace `explainer-docs` with your Cloudflare Pages project name. Each app needs its own project. See the [CI/CD](/explainer/deployment/ci-cd) page for the full workflow structure.
Copy file name to clipboardExpand all lines: apps/docs/src/content/docs/explainer/default/en/deployment/vercel.mdx
+2-14Lines changed: 2 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,19 +44,7 @@ Each app can have its own `vercel.json` for customization:
44
44
45
45
## GitHub Actions workflow
46
46
47
-
The deploy workflow is triggered on push to `main` when files in the relevant app or shared packages change:
48
-
49
-
```yaml [.github/workflows/deploy-docs.yml]
50
-
on:
51
-
push:
52
-
branches: [main]
53
-
paths:
54
-
- 'apps/docs/**'
55
-
- 'packages/**'
56
-
workflow_dispatch:
57
-
```
58
-
59
-
When `DEPLOY_TARGET` is set to `vercel`, the workflow uses:
47
+
The unified workflow at `.github/workflows/deploy.yml` handles all three apps. When `DEPLOY_TARGET` is set to `vercel`, the deploy job uses:
60
48
61
49
```yaml
62
50
- uses: amondnet/vercel-action@v25
@@ -69,5 +57,5 @@ When `DEPLOY_TARGET` is set to `vercel`, the workflow uses:
69
57
```
70
58
71
59
:::callout{variant="info"}
72
-
Create separate workflows (`deploy-blog.yml`, `deploy-website.yml`) for each app, using the same pattern with different project IDs and path filters.
60
+
Each app has its own build and deploy jobs within the same workflow. See the [CI/CD](/explainer/deployment/ci-cd) page for the full workflow structure.
0 commit comments