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
This repository ships a GitHub Action implemented in Go.
4
+
5
+
## Runtime
6
+
- Action definition: `action.yml`
7
+
- Action type: `composite`
8
+
- Runtime binary: prebuilt amd64 Linux artifact in `dist/`
9
+
- No Docker image build is required during action execution.
10
+
11
+
## Go Tooling
12
+
- Go commands should be run via `mise` for toolchain consistency.
13
+
- Examples:
14
+
-`mise exec -- go test ./...`
15
+
-`mise exec -- go run ./cmd/pullpreview up examples/example-app`
16
+
-`make dist`
17
+
- Dist workflow:
18
+
- Commit source changes first.
19
+
- Run `make dist` afterwards.
20
+
-`make dist` auto-commits the updated bundled binary with a standard commit message.
21
+
- Before merging, `make rewrite` can rewrite the current branch and drop dist-only auto-commits (force-push required).
22
+
23
+
## CLI
24
+
Entrypoint source is `cmd/pullpreview/main.go`.
25
+
26
+
Supported commands:
27
+
-`pullpreview up path/to/app`
28
+
-`pullpreview down --name <instance>`
29
+
-`pullpreview list org/repo`
30
+
-`pullpreview github-sync path/to/app`
31
+
32
+
## Deploy behavior (`up`)
33
+
- Launches/restores Lightsail instance and waits for SSH.
34
+
- Uploads authorized keys.
35
+
- Renders compose config, rewrites relative bind mounts under `app_path` to `/app/...`, and syncs only those bind-mounted local paths to the server via `rsync`.
36
+
- Deploys through Docker context to the remote engine.
37
+
- Executes `pre_script` inline over SSH before `docker compose up` (script must be self-contained).
38
+
- Optional automatic HTTPS proxying via Caddy + Let's Encrypt when `proxy_tls` is set.
39
+
- Format: `service:port` (for example `web:80`).
40
+
- Forces preview URL/output to HTTPS on port `443`.
41
+
- Opens firewall port `443` and suppresses firewall exposure for port `80`.
42
+
- Injects `pullpreview-proxy` service unless host port `443` is already published (then it logs a warning and skips proxy injection).
0 commit comments