Skip to content

Commit da11397

Browse files
jmschneiderclaude
andcommitted
docs: demote VPN from on-ramp paths to a focused subsection
VPN pairing is irrelevant for adopters with public deploy hosts but sat squarely on the path-of-least-resistance — Quick Start example, secrets table, secrets list, plus four scattered mentions in action.yml's marketplace description. Consolidate it into a single "Private deploy hosts" subsection in getting-started, with short pointers from README and examples for the audience that needs it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3f23d2a commit da11397

4 files changed

Lines changed: 41 additions & 41 deletions

File tree

‎README.md‎

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ jobs:
7373
steps:
7474
- uses: actions/checkout@v4
7575

76-
# Optional: open a VPN tunnel if your deploy host is private.
77-
# The VPN action and kamal-previews are independent concerns —
78-
# compose them as sibling steps. Drop this step if your host is
79-
# public.
80-
# - uses: <your-vpn-action>@v1
81-
# with: { ... }
82-
8376
- uses: web-ascender/github-actions-kamal-previews@v1
8477
with:
8578
base-deploy-file: config/deploy.staging.yml
@@ -103,7 +96,6 @@ The repo-level GitHub Actions secrets the workflow expects:
10396
| --- | --- |
10497
| `DEPLOY_SSH_KEY` | Always — the deploy host SSH key. |
10598
| `DATABASE_ADMIN_URL` | Only if the URL exposed by your `base-secrets-file` doesn't have CREATEDB. Format: `postgres://admin:secret@host:5432/postgres?sslmode=verify-full`. |
106-
| VPN credentials (if any) | Only if pairing with a VPN step above. Names depend on the VPN action you choose. |
10799

108100
Add them under Settings → Secrets and variables → Actions. The first PR
109101
you open after merging the workflow file will provision a preview
@@ -117,10 +109,13 @@ walkthrough including DNS, TLS, secrets, and host setup.
117109
Prefer the reusable workflow form
118110
(`uses: web-ascender/github-actions-kamal-previews/.github/workflows/preview.yml@v1`)
119111
when you want job-level features like matrix-fanned parallel orphan
120-
cleanup or GitHub's job-level concurrency UI. It does NOT support
121-
VPN pairing — workflows can't host sibling steps the way actions
122-
can — so private-host setups must use the composite action form above.
123-
See [`examples/README.md`](examples/README.md) for the comparison.
112+
cleanup or GitHub's job-level concurrency UI. See
113+
[`examples/README.md`](examples/README.md) for the comparison.
114+
115+
> Private deploy host? Stick with the composite action form above and
116+
> add your VPN action as a sibling step — the reusable workflow form
117+
> can't host sibling steps. See
118+
> [getting-started](docs/getting-started.md#private-deploy-hosts).
124119
125120
## Architecture at a glance
126121

‎action.yml‎

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ description: |
1717
steps:
1818
- uses: actions/checkout@v4
1919
20-
# Optional: open a VPN tunnel before this action runs,
21-
# so SSH to a private deploy host works.
22-
# - uses: <your-vpn-action>@v1
23-
# with: { ... }
24-
2520
- uses: web-ascender/github-actions-kamal-previews@v1
2621
with:
2722
base-deploy-file: config/deploy.staging.yml
@@ -44,24 +39,18 @@ description: |
4439
- delete (branch) → teardown
4540
- anything else → skip (with notice)
4641
47-
VPN setup is intentionally NOT in this action — pair it with any VPN
48-
action you already trust as a sibling step. Tunnels established in
49-
earlier steps remain active for the subsequent `kamal-previews` step
50-
in the same job.
51-
5242
Two consumption forms; pick whichever fits:
5343
5444
- **This composite action** — single-step, sibling-friendly. Use when
55-
your job needs a sibling VPN tunnel, custom credential-fetch step,
56-
or any other pre/post step around kamal-previews itself.
45+
your job needs sibling steps around kamal-previews (e.g. opening a
46+
VPN tunnel before SSH to a private deploy host, or a custom
47+
credential-fetch step).
5748
- **Reusable workflow** at
5849
`web-ascender/github-actions-kamal-previews/.github/workflows/preview.yml@v1` —
5950
multi-job, with deploy and teardown as separate jobs. Use when you
6051
don't need sibling steps and want stricter concurrency control.
6152
62-
Both forms support `branch-pattern` and `max-active-previews`. Neither
63-
ships with VPN inputs; add the VPN as a sibling step (composite) or a
64-
pre-step in your wrapping workflow (reusable).
53+
Both forms support `branch-pattern` and `max-active-previews`.
6554
6655
inputs:
6756
base-deploy-file: { required: true }

‎docs/getting-started.md‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ jobs:
146146
steps:
147147
- uses: actions/checkout@v4
148148

149-
# Optional: open a VPN tunnel before kamal-previews runs.
150-
# Skip this step if your deploy host is publicly addressable.
151-
# - uses: <your-vpn-action>@v1
152-
# with: { ... }
153-
154149
- uses: web-ascender/github-actions-kamal-previews@v1
155150
with:
156151
base-deploy-file: config/deploy.staging.yml
@@ -175,8 +170,6 @@ variables → Actions:
175170
out to `bin/rails credentials:fetch ...` for the URL
176171
- `DATABASE_ADMIN_URL` — only if your staging app role lacks `CREATEDB`
177172
privilege (then provide a separate admin URL with that privilege)
178-
- VPN credentials — only if you're using a VPN step (names depend
179-
on the VPN action you choose)
180173

181174
## Step 6: Open a test PR
182175

@@ -190,6 +183,28 @@ see:
190183
Open the URL in a browser — you should see your app, populated with the
191184
data from `myapp_staging` cloned moments ago.
192185

186+
## Private deploy hosts
187+
188+
If your deploy host isn't publicly reachable, open a VPN tunnel as a
189+
sibling step before the kamal-previews step. The two are independent
190+
concerns — pick whichever VPN action you already trust:
191+
192+
```yaml
193+
steps:
194+
- uses: actions/checkout@v4
195+
196+
- uses: <your-vpn-action>@v1
197+
with: { ... }
198+
199+
- uses: web-ascender/github-actions-kamal-previews@v1
200+
with: { ... }
201+
```
202+
203+
The tunnel established by the earlier step stays open for the rest of
204+
the job. Add whatever credential secrets the VPN action requires
205+
alongside `DEPLOY_SSH_KEY`. The reusable-workflow form doesn't support
206+
this pattern — for private hosts, stick with the composite action.
207+
193208
## Step 7 (recommended): Add the daily sweeper
194209

195210
The deploy / teardown lifecycle is event-driven and very reliable, but

‎examples/README.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ adjust the `with:`, `env:`, and `secrets:` blocks for your environment.
77

88
| File | Use when |
99
| --- | --- |
10-
| [minimal/preview.yml](minimal/preview.yml) | Public deploy host, single Postgres DB. The shortest config that works. |
11-
| [postgres/preview.yml](postgres/preview.yml) | Your staging DB is PostgreSQL — full-featured (VPN pairing, multi-DB, caps). |
10+
| [minimal/preview.yml](minimal/preview.yml) | Single Postgres DB, public deploy host. The shortest config that works. |
11+
| [postgres/preview.yml](postgres/preview.yml) | Your staging DB is PostgreSQL — full-featured (multi-DB, resource caps, branch filters). |
1212
| [postgres/sweep.yml](postgres/sweep.yml) | Optional daily orphan cleanup. |
1313
| [mysql/preview.yml](mysql/preview.yml) | Your staging DB is MySQL. |
1414
| [sqlite/preview.yml](sqlite/preview.yml) | Your staging DB is SQLite (file on the deploy host). |
1515

1616
Every example uses the **composite action** form (`uses:
1717
web-ascender/github-actions-kamal-previews@v1`) — a single step inside a single job.
18-
This composes naturally with a sibling VPN step. See the
19-
[postgres example](postgres/preview.yml) for a worked VPN pairing.
18+
This composes naturally with sibling steps such as a VPN tunnel for
19+
private deploy hosts.
2020

2121
## Reusable-workflow form (advanced)
2222

@@ -33,6 +33,7 @@ jobs:
3333
secrets: inherit
3434
```
3535
36-
The reusable workflow form does NOT support VPN pairing (workflows
37-
are jobs, not steps — there's no place to insert a sibling VPN step). If
38-
your deploy host is private, use the composite action form.
36+
The reusable workflow form is jobs-only — there's no place to insert
37+
sibling steps. If you need to pair kamal-previews with another step
38+
(e.g. a VPN tunnel for a private deploy host), use the composite
39+
action form.

0 commit comments

Comments
 (0)