CI/CD Deployments

Use GitHub Actions, GitLab CI/CD or other pipelines.

  1. Add deploy public key to ~/authorized_keys file on servers (use make terraform apply command if you haven’t already done so)
  2. Check required apps already installed on servers (use make ansible command if you haven’t already done so)
  3. Add secrets variables to repo options:

SSH config example:

# SSH_CONFIG
Host *
   IdentitiesOnly yes
   StrictHostKeyChecking no

# Develop server ssh alias
Host develop.starter-kit.io
  HostName 00.00.00.00
  User serverusername
  Port 22

# Prod server ssh alias
Host starter-kit.io
  HostName 00.00.00.00
  User serverusername
  Port 22

COMPOSER_AUTH example for GitHub secrets:

{\"github-oauth\":{\"github.com\":\"ACCESS_TOKEN_GITHUB\"}}

COMPOSER_AUTH example for local usage:

{"github-oauth":{"github.com":"ACCESS_TOKEN_GITHUB"}}
  1. Check CI/CD jobs config file, use ./.github for GitHub Actions
  2. Push some changes to deployment branch and check pipelines logs