الملفات
2026-07-28 13:34:58 +03:00
..
2026-07-28 13:34:58 +03:00
2026-07-28 13:34:58 +03:00
2026-07-28 13:34:58 +03:00
2026-07-28 13:34:58 +03:00
2026-07-28 13:34:58 +03:00
2026-07-28 13:34:58 +03:00

Ghaymah CI/CD Guide

Staging vs. Production

  • Staging is a pre-production environment used to test changes safely before they reach real users. It is typically isolated from production data and traffic, so teams can validate deployments, configuration, and application behavior without affecting live services.
  • Production is the live environment that serves real users and business-critical traffic. Deployments here should be controlled carefully, usually with approval gates, protected environments, and rollback plans.
  • A common release flow is:
    1. Build and test the application.
    2. Deploy to staging.
    3. Validate the release.
    4. Request approval for production.
    5. Deploy to production.

Connecting the GitHub Actions workflow to Ghaymah CLI

The workflow uses the Ghaymah CLI to authenticate and deploy the app.

1. Add GitHub secrets

Create these repository or environment secrets in GitHub:

  • GHAYMAH_EMAIL
  • GHAYMAH_PW

2. Install the CLI

The workflow installs the CLI during the deployment job:

curl -sSL https://cli.ghaymah.systems/install.sh | bash

3. Authenticate with Ghaymah

After installation, the workflow logs in with the stored credentials:

$HOME/ghaymah/bin/gy auth login --email "${{ secrets.GHAYMAH_EMAIL }}" --password "${{ secrets.GHAYMAH_PW }}" --debug

4. Deploy the application

The deployment step then launches the app through Ghaymah:

$HOME/ghaymah/bin/gy resource app launch --debug

Use GitHub Environments for deployment control:

  • Create a staging environment for regular validation.
  • Create a production environment and require manual approval before deployment.
  • Attach the same secrets to the relevant environment when needed.