feat(cd): add github job to preview deploy#409
Open
okt-limonikas wants to merge 1 commit into
Open
Conversation
Signed-off-by: Danil Kostromin <danil.kostromin@icloud.com>
a14a75a to
a1b54e8
Compare
k0nstantin
approved these changes
Dec 5, 2025
a1b54e8 to
a749da0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See also ts-factory/bublik-docker#28
Problem
We need an automated way to deploy and test different branches for review purposes without manual infrastructure setup.
Solution
This PR adds Ansible-based automation for deploying ephemeral environments to a shared VM using Traefik for routing.
Requirements
OS: Ubuntu 24.04 LTS
CPU: At least 4 cores
RAM: At least 16 GB
SSH Access: Required for Ansible deployment
What are Ephemeral Environments?
Ephemeral environments are temporary, isolated deployment instances that allow developers to test changes before merging. Each environment runs independently with its own subdomain.
Deployment Types
The system supports three deployment types, automatically triggered by GitHub Actions:
bublik-preview-example.com) - Deployed when commits onmainbranch are taggedstaging.bublik-preview-example.com) - Deployed on every push tomainbranchpr-123.bublik-preview-example.com) - Deployed for pull requestsHow to Use
Specifying Branches for PR Deployments
By default, PR environments deploy the PR branch for frontend and
mainfor other components. To customize which branches to deploy, add a comment to your PR with the following format:Available components:
backend- bublik repository branchfrontend- bublik-ui repository branch (defaults to PR branch)docker- bublik-docker repository branchRequired GitHub Secrets
The following secrets must be configured in your repository settings for the automation to work:
Required GitHub Variables
Manual Deployment
You can also deploy manually using the provided Ansible playbooks:
1. Setup VM
2. Deploy Environment