11# <img width =" 25 " height =" 25 " alt =" pullpreview " src =" https://github.com/user-attachments/assets/3aeb0f94-cac5-44b2-9f8e-abdb12be9cfe " /> PullPreview
22
3- A GitHub Action that starts live environments for your pull requests and branches .
3+ A GitHub Action that starts live environments for your pull requests.
44
55[ ![ pullpreview] ( https://github.com/pullpreview/action/actions/workflows/pullpreview.yml/badge.svg )] ( https://github.com/pullpreview/action/actions/workflows/pullpreview.yml )
66<a href =" https://news.ycombinator.com/item?id=23221471 " ><img src =" https://img.shields.io/badge/Hacker%20News-83-%23FF6600 " alt =" Hacker News " ></a >
77
88## Spin environments in one click
99
1010Once installed in your repository, this action is triggered any time a change
11- is made to Pull Requests labelled with the ` pullpreview ` label, or one of the
12- _ always-on_ branches.
11+ is made to Pull Requests labelled with the ` pullpreview ` label.
1312
1413When triggered, it will:
1514
16151 . Check out the repository code
17162 . Provision a preview instance (Lightsail by default, or Hetzner with ` provider: hetzner ` ), with docker and docker-compose set up
18- 3 . Continuously deploy the specified pull requests and branches, using your docker-compose file(s)
17+ 3 . Continuously deploy the specified pull requests using your docker-compose file(s)
19184 . Report the preview instance URL in the GitHub UI
2019
2120It is designed to be the ** no-nonsense, cheap, and secure** alternative to
@@ -61,9 +60,7 @@ Preview environments that:
6160 docker-compose, it can be deployed to preview environments with PullPreview.
6261
6362- can be ** started and destroyed easily** : You can manage preview environments
64- by adding or removing the ` pullpreview ` label on your Pull Requests. You can
65- set specific branches as always on, for instance to continuously deploy your
66- master branch.
63+ by adding or removing the ` pullpreview ` label on your Pull Requests.
6764
6865- are ** cheap too run** : Preview environments are launched on AWS Lightsail
6966 instances, which are both very cheap (10USD per month, proratized to the
@@ -110,7 +107,6 @@ All supported `with:` inputs from `action.yml`:
110107| Input | Default | Description |
111108| --- | --- | --- |
112109| ` app_path ` | ` . ` | Path to your application containing Docker Compose files (relative to ` ${{ github.workspace }} ` ). |
113- | ` always_on ` | ` "" ` | Comma-separated branch names that should always be deployed. |
114110| ` dns ` | ` my.preview.run ` | DNS suffix used for generated preview hostnames. Built-in alternatives: ` rev1.click ` through ` rev9.click ` (see note below). |
115111| ` max_domain_length ` | ` 62 ` | Maximum generated FQDN length (cannot exceed 62 for Let's Encrypt). |
116112| ` label ` | ` pullpreview ` | Label that triggers preview deployments. |
@@ -150,7 +146,7 @@ ssh-keygen -t rsa -b 3072 -m PEM -N "" -f hetzner_ca_key
150146
151147## Example
152148
153- Workflow file with the ` master ` branch always on :
149+ Workflow file for pullpreview-driven deployments :
154150
155151``` yaml
156152# .github/workflows/pullpreview.yml
@@ -176,8 +172,6 @@ jobs:
176172 with :
177173 # Those GitHub users will have SSH access to the servers
178174 admins : crohr,other-github-user
179- # A preview environment will always exist for the main branch
180- always_on : main
181175 # Use the cidrs option to restrict access to the live environments to specific IP ranges
182176 cidrs : " 0.0.0.0/0"
183177 # PullPreview will use those 2 files when running docker-compose up
@@ -220,7 +214,6 @@ jobs:
220214 - uses : pullpreview/action@v6
221215 with :
222216 admins : " @collaborators/push"
223- always_on : master
224217 app_path : ./examples/workflow-smoke
225218 provider : hetzner
226219 # optional Hetzner runtime options
0 commit comments