Workflows - Melomania-be/back GitHub Wiki
GitHub Actions Workflows Documentation
This repository contains GitHub Actions workflows to automate deployment, versioning, release, and CI/CD processes. Workflows are grouped into usable workflows (manually runnable or triggered in day-to-day work) and internal reusable workflows (supporting logic for other workflows).
Table of Contents
Usable Workflows (Manually Runnable)
- Deploy to Development Server
- Promote Development to Production
- Release Development
- Release Production
Internal Reusable Workflows (For Composition)
- Build (Reusable)
- Bump Version
- Create Release
- Disable Branch Protection
- Enable Branch Protection
- Node.js CI Workflow
Usable Workflows (Manually Runnable)
Deploy to Development Server
File: .github/workflows/deploy_dev.yml
Description: Deploys the latest built code to the development server.
Triggers:
- On push to
release-dev
- Manual run via GitHub UI
Key Steps:
- Build the application using
_build.yml
- Whitelist runner IP, transfer files using
rsync
(twice for Imunify360 compatibility) - Restart Node.js app with
cloudlinux-selector
- Run migrations/seeds
- Clean up SSH and artifacts
Promote Development to Production
File: .github/workflows/promote-developpement-prod.yml
Description: Bumps the version, creates a release, merges release back into dev
, and promotes it to prod
.
Trigger:
- Manual dispatch via GitHub Actions with
versionType
input (patch
,minor
, ormajor
)
Workflow Summary:
- Bump Version: Uses
_bump_version.yml
ondev
- Create Release: Creates GitHub release from
dev
using_create_release.yml
- Disable Branch Protection: Disables
dev
andprod
protection via_disable_protection.yml
- Update Development Branch: Merges release branch into
dev
- Update Production Branch: Replaces
prod
with a fresh branch fromdev
- Enable Branch Protection: Re-enables
dev
andprod
protection via_enable_protection.yml
Release Development
File: .github/workflows/release-developpement.yml
Description: Handles packaging and releasing a new development build.
Release Production
File: .github/workflows/release-production.yml
Description: Handles packaging and releasing a new production version.
Internal Reusable Workflows (For Composition)
Build (Reusable)
File: .github/workflows/_build.yml
Description: Shared build step used by workflows like deploy_dev.yml
.
Bump Version
File: .github/workflows/_bump_version.yml
Description: Automatically increases the version number on a given branch (patch
, minor
, or major
).
Create Release
File: .github/workflows/_create_release.yml
Description: Creates a GitHub Release with a changelog based on version bump results.
Disable Branch Protection
File: .github/workflows/_disable_protection.yml
Description: Temporarily removes branch protection rules to allow automation.
Enable Branch Protection
File: .github/workflows/_enable_protection.yml
Description: Restores branch protection after automatic operations are complete.
Node.js CI Workflow
File: .github/workflows/node.js.yml
Description: Linting, testing, and CI steps for Node.js-based applications.
Primarily used for validation in PRs or reusable CI tasks.