Skip to content

How-To: The Git And Deployment Workflow

This guide describes the current AIOHM workflow from local development to production deployment.

Overview

The platform now uses a clean production main branch and one full-source dev branch: local-dev.

mermaid
graph TD
    A[local-dev branch] --> B[GitHub docs build];
    B --> C[filtered-pr-local-dev bot branch];
    C --> D[Pull Request to main];
    D --> E[main];
    E --> F[GitHub release ZIP];
    F --> G[VPS deploy script];
    G --> H[Live aiohm.org];

Step 1: Work On local-dev

Create or continue local-dev on your development machine.

bash
git checkout -B local-dev

Dev branches keep the full workspace, including:

  • docs/ VitePress source
  • scripts/
  • tests
  • local tooling

Step 2: Commit And Push

Commit your changes locally and push local-dev to GitHub.

bash
git push -u origin local-dev

Step 3: Let GitHub Prepare Production

Once you push:

  1. GitHub rebuilds public/docs/ from the VitePress source.
  2. GitHub creates or updates the bot-managed filtered-pr-local-dev production branch.
  3. A pull request is opened from that filtered branch into main.

The filtered branch excludes dev-only folders and keeps only production-safe content.

Step 4: Merge To Main

After validation passes, merge the production PR into main.

main should contain only the production application, built docs, installer package, and the workflow files needed to create releases.

Step 5: Use The Release Package

Every successful main update creates a GitHub release ZIP that includes:

  • built frontend assets
  • built docs
  • install scripts
  • application code needed for production

It excludes:

  • docs/
  • scripts/
  • tests/
  • local dependency folders
  • runtime storage from a developer machine

Step 6: Deploy To The VPS

From a full dev checkout, deploy the latest release package:

bash
VPS_USE_SUDO=true bash scripts/github-aiohm-last-version.sh

That script downloads the latest GitHub release asset, preserves runtime state on the server, updates the application files, and runs the Laravel post-deploy steps.