---
title: "Git, releases and deploys for every dev site"
description: "Connect a GitHub repo, work on branches, build a checked release, deploy after a dry run, go back a release and test your backups."
url: https://in-a-box.online/webdev/git-and-deploys/
---
1.  [In a Box](https://in-a-box.online/)
2.  [Kits](https://in-a-box.online/kits/)
3.  [WebDev (in a box)](https://in-a-box.online/webdev/)

KIT TOOL · GIT AND DEPLOYS

# Git, releases and deploys, the same on every stack

Every dev site is a git repo, and git, releases and deploys follow the same steps whatever the site is built with. The assistant works on a branch, a release is built and checked, and a deploy goes to your host when you say.

[Follow a change](#dev-copy)[Tell us about your site](https://in-a-box.online/contact/)

karkinos.local / tools / web-dev / willowandash

![One dev site in the panel, with its Overview, Releases, Deploys, Backups, Checks and Settings tabs, and the dev site, mail catcher and traffic viewer running beside it. Example data.](https://in-a-box.online/img/topic-kits-web-development-sites.webp)

01 · QUICK ANSWERS

## What people ask first

### Does it work with my GitHub repo?

Yes, private ones too. Sign the box in to GitHub on the Connections page and install its GitHub App on the repos it may use. The assistant can then clone, push and open pull requests.

### Can I keep my own branch names?

Yes. Git flow with main and develop is suggested, main on its own works, and so do names of your own.

### How do I undo a release?

Go back a release, which makes the one before current again, then deploy it. For the database and files, restore a backup. A snapshot of the site is taken first.

### Can it deploy to my host without a dry run?

No. A real deploy is refused until a dry run of the same release to the same place has passed just before it.

### Will I know when a deploy or backup fails?

If you want to. Each one raises an event, so a rule on the Events page can leave you a note or ask the assistant to look.

02 · ONE CHANGE, START TO FINISH

## From a branch to your host, with a way back

The same steps on every stack. Nothing reaches your host until you say.

1.  ### The branch
    
    The assistant pulls the staging branch and makes a branch for the work.
    
2.  ### The checks
    
    It builds on the dev site and runs the site’s checks before it calls the work done.
    
3.  ### The pull request
    
    Into staging, for you to merge. Merged branches are kept.
    
4.  ### The release
    
    Built in a fresh folder from the committed branch, its pages fetched, and made current only if both pass.
    
5.  ### The dry run
    
    What would change on your host, with nothing sent.
    
6.  ### The deploy
    
    rsync or SFTP over ssh, or a git push, when you say.
    
7.  ### One step back
    
    Go back a release, then deploy the one before.
    

03 · BRANCHES

## A branch, a pull request, your merge

The assistant pulls the staging branch, makes a branch for the work, checks it and opens a pull request into staging. Staging goes into production for a release.

-   ### Connect a repo later
    
    Point a site at a new GitHub repo and its branches are pushed there in one step.
    
-   ### New commits noticed within a minute
    
    A commit on production or staging raises an event, so a rule of yours can act on it.
    
-   ### Merged branches kept
    
    Nothing is deleted after a merge, so the history stays whole.
    
-   ![](https://in-a-box.online/img/connects/github.svg)
    
    ### Signed in once
    
    The box signs in to GitHub with its own GitHub App, installed only on the repos you pick. Its token renews itself every 15 minutes, and never sits in a command or a file in your repo.
    

04 · RELEASES

## A release that proves itself

Each release is built in a fresh folder from the committed branch, with the lockfiles deciding what is installed. It is served on its own, its pages are fetched, and it becomes current only when the build and the check pass.

-   ### What counts as a pass
    
    Every page under 500 with no PHP error, WordPress critical error, Python traceback or Laravel error showing.
    
-   ### Five kept
    
    The last five passing releases, and the newest failed one to read.
    
-   ### Only what is built ships
    
    A static site sends its built folder, never its source.
    

05 · SETTINGS

## A .env built from the key store

Laravel, Django and Next.js sites get a .env written from names in the key store, with the database settings added. Values never go into the repo, and git is set to ignore the file.

Willow & Ash · Build the .env

Sitewillowandash

MAIL\_HOSTWILLOW\_MAIL\_HOST

MAIL\_PASSWORDWILLOW\_MAIL\_PASSWORD

Write .env

06 · DEPLOYS

## To your host, dry run first

Set a target up once, in three steps, and deploy to it whenever you say.

-   ### Three ways
    
    rsync or SFTP over ssh, or a git push to hosts that deploy from git.
    
-   ### Never sent
    
    The .git folder, the .env and the dev box's own notes, plus anything the host keeps for itself.
    
-   ### A dry run first
    
    The real deploy is refused until a dry run of the same release has passed.
    
-   ### The host checked
    
    Its key is kept on first contact, and a changed key stops the deploy until you look.
    
-   ### Store themes too
    
    A Shopify or BigCommerce theme is pushed from the same Deploys tab, and its push is on the record like any deploy.
    

Willow & Ash · Set up a deploy

Target nameproduction

Howrsync over ssh

Stageproduction

Host (key store name)WILLOW\_PROD\_HOST

Credential (key store name)WILLOW\_PROD\_KEY

Save

07 · BACKUPS

## Backups that are tested

Nightly if you like, to any storage rclone can reach, with the newest 14 kept by default. A restore test fetches a backup, checks its checksums and imports it into a scratch database, and changes nothing on the site.

-   ![](https://in-a-box.online/img/connects/rclone.svg)
    
    ### Where they go
    
    Any storage rclone reaches, such as S3, Backblaze B2, Google Drive, Dropbox or SFTP. The settings stay in the key store.
    
-   ### What’s in one
    
    A database dump, the repo packed with its history, and a list of checksums.
    
-   ### A real restore
    
    Files, database or both. A snapshot of the site as it is now is taken first, so you can go back.
    
-   ### A restore test
    
    Unpacks and imports a backup into a scratch folder and database, counts what’s there, and changes nothing.
    

08 · ON THE RECORD

## Every release, deploy and backup, written down

Each site keeps its history, and each step raises an event, so a rule can tell you or act on it.

-   ### A release
    
    Built and made current, failed its build or page check, or moved back.
    
-   ### A deploy
    
    Done, or failed.
    
-   ### A backup
    
    Done, or failed.
    
-   ### A restore
    
    Done, failed, or a test that found problems.
    
-   ### GitHub
    
    The box’s token renewed, or not.
    

Willow & Ash · HistoryExample data

A site’s releases, deploys and backups

When

What

Result

Mon 09:12

Release built from staging

Made current

Mon 09:20

Dry run to production

Passed, 14 files would change

Mon 09:22

Deploy to production

Done

Mon 03:15

Nightly backup

Copied off the box

Sun 11:02

Restore test

Passed

09 · THE REST OF THE KIT

## More of the kit

Releases carry work that the tests, the browser and the accessibility checks have already passed.

[WebDev (in a box)](https://in-a-box.online/webdev/)

### ITS OWN PARTS

-   [Testing and code qualityPHPStan, PHPCS, PHPUnit, linting and browser checks, chosen per site and run by hand or by a rule.](https://in-a-box.online/webdev/testing/)
-   [Shopify and BigCommerce themesTheme Check and Stencil before anything is pushed to the store.](https://in-a-box.online/webdev/shopify-and-bigcommerce-themes/)
-   [Your current siteA dev copy of the site you already run, on its own stack.](https://in-a-box.online/webdev/your-site/)
-   [Site stacksEvery kind of dev site, from plain HTML to WordPress and Django.](https://in-a-box.online/webdev/sites/)
-   [Hosted buildersShopify and BigCommerce theme dev sites, checked before every push.](https://in-a-box.online/webdev/builders/)

### TOOLS IN THE KIT

-   [Browser toolsSearches the web, reads a page as text, and opens it in a real browser to click, fill in and take screenshots.](https://in-a-box.online/webdev/browser/)
-   [SEO and GEO checksChecks how your live sites are found by Google and cited by AI search, on demand or on a schedule, with a change log.](https://in-a-box.online/webdev/seo-and-geo/)
-   [Accessibility checksaxe and Lighthouse against WCAG 2.2, with a screen reader transcript.](https://in-a-box.online/webdev/accessibility/)
-   [DesignScreens, layouts and components in the browser (Penpot), with the assistant designing in the same files, live.](https://in-a-box.online/tools/design/)
-   [MarketingEmails to customers who opted in, review requests and social posts. Every email waits for your yes.](https://in-a-box.online/tools/marketing/)
-   [Office suiteDocuments, spreadsheets and presentations open from Files in your browser (Collabora), with the assistant in the same file.](https://in-a-box.online/tools/office-suite/)
-   [Creative suiteOpen source editors for photos, vectors, layout, PDFs, video, motion and sound (the Craft apps).](https://in-a-box.online/tools/creative-suite/)
-   [Your voiceLearns how you write from your own writing, then checks or rewrites any text so it sounds like you.](https://in-a-box.online/tools/your-voice/)
-   [FeedsNews, blogs and YouTube channels in one reader, searched and sorted for you, with saved searches.](https://in-a-box.online/tools/feeds/)

### FROM THE ASSISTANT, ON EVERY PLAN

-   [SkillsThe written steps it follows for web work, which you can read and switch off.](https://in-a-box.online/webdev/skills/)
-   [Blueprints and made toolsSmall tools beside your sites, built after you approve them.](https://in-a-box.online/webdev/blueprints/)

10 · THE STACKS AND BUILDERS

## On every stack you run

Every site runs on the PHP, Python or Node version it needs, side by side on the same server, and the quality tools are one shared install. WordPress, Laravel, Drupal, Craft, Joomla and Django come with a database, and Statamic, plain PHP, Flask, Astro and Next.js get one when it is switched on for that site. Anything else that runs on Linux starts as an empty site. HTML with a JavaScript and CSS build is a kind of its own, and Shopify and BigCommerce themes get dev sites too.

### SITE STACKS

-   [Astro dev sites](https://in-a-box.online/webdev/sites/astro/)
-   [Craft CMS dev sites](https://in-a-box.online/webdev/sites/craft/)
-   [Django dev sites](https://in-a-box.online/webdev/sites/django/)
-   [Drupal dev sites](https://in-a-box.online/webdev/sites/drupal/)
-   [Flask dev sites](https://in-a-box.online/webdev/sites/flask/)
-   [Joomla dev sites](https://in-a-box.online/webdev/sites/joomla/)
-   [Laravel dev sites](https://in-a-box.online/webdev/sites/laravel/)
-   [Next.js dev sites](https://in-a-box.online/webdev/sites/nextjs/)
-   [Plain PHP dev sites](https://in-a-box.online/webdev/sites/php/)
-   [Plain HTML dev sites](https://in-a-box.online/webdev/sites/plain-html/)
-   [Statamic dev sites](https://in-a-box.online/webdev/sites/statamic/)
-   [WordPress dev sites](https://in-a-box.online/webdev/sites/wordpress/)

### HOSTED BUILDERS

-   [BigCommerce](https://in-a-box.online/webdev/builders/bigcommerce/)
-   [Shopify](https://in-a-box.online/webdev/builders/shopify/)

READY WHEN YOU ARE

## Released with a way back

WebDev (in a box) runs on your own cloud server, hosted in Europe, from £250 a month.

[See the plans](https://in-a-box.online/pricing/#plans)[Get in touch](https://in-a-box.online/contact/)
