ci: automatic Alpha deployment on merge to main #118

Merged
k9ert merged 5 commits from feature/auto-deploy into main 2026-02-27 08:13:52 +00:00
Collaborator

Changes

Adds deploy-alpha job to the CI workflow:

deploy-alpha:
  needs: [test, lint]
  if: push to main
  → SSH into olymp → run deploy.sh

How it works

  1. PR gets merged to main
  2. CI runs tests + lint (as before)
  3. If both pass, deploy-alpha job SSHs into olymp
  4. Runs /home/alpha/workspace/cobot/deploy.sh forgejo
  5. deploy.sh pulls latest, restarts cobot-alpha service

Setup Required

⚠️ Before merging, configure these Forgejo secrets (Settings → Secrets):

Secret Value
DEPLOY_HOST olymp address reachable from CI runner
DEPLOY_USER User with access to deploy.sh + systemctl restart
DEPLOY_SSH_KEY SSH private key for that user

Zeus has been asked to configure these.

Safety

  • Only triggers on push to main (not PRs)
  • Only runs after tests + lint pass
  • deploy.sh is idempotent and handles stash/restore of local changes
  • deploy.sh verifies service starts successfully after restart
## Changes Adds `deploy-alpha` job to the CI workflow: ```yaml deploy-alpha: needs: [test, lint] if: push to main → SSH into olymp → run deploy.sh ``` ## How it works 1. PR gets merged to main 2. CI runs tests + lint (as before) 3. If both pass, `deploy-alpha` job SSHs into olymp 4. Runs `/home/alpha/workspace/cobot/deploy.sh forgejo` 5. deploy.sh pulls latest, restarts cobot-alpha service ## Setup Required ⚠️ **Before merging**, configure these Forgejo secrets (Settings → Secrets): | Secret | Value | |--------|-------| | `DEPLOY_HOST` | olymp address reachable from CI runner | | `DEPLOY_USER` | User with access to deploy.sh + systemctl restart | | `DEPLOY_SSH_KEY` | SSH private key for that user | Zeus has been asked to configure these. ## Safety - Only triggers on push to main (not PRs) - Only runs after tests + lint pass - deploy.sh is idempotent and handles stash/restore of local changes - deploy.sh verifies service starts successfully after restart
ci: add automatic Alpha deployment on merge to main
Some checks failed
CI / lint (pull_request) Successful in 9s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.12) (pull_request) Successful in 27s
CI / test (3.13) (pull_request) Successful in 26s
E2E Tests / e2e (pull_request) Successful in 16s
CI / deploy-alpha (pull_request) Failing after 0s
CI / build (pull_request) Successful in 6s
493d69bc7e
Adds deploy-alpha job to CI workflow that:
- Runs only on push to main (not PRs)
- Waits for test + lint to pass
- SSHs into olymp and runs deploy.sh

Requires Forgejo secrets: DEPLOY_HOST, DEPLOY_USER, DEPLOY_SSH_KEY
ci: move deploy-alpha to separate workflow
All checks were successful
CI / lint (pull_request) Successful in 9s
CI / test (3.11) (pull_request) Successful in 23s
CI / test (3.12) (pull_request) Successful in 24s
CI / test (3.13) (pull_request) Successful in 25s
E2E Tests / e2e (pull_request) Successful in 15s
CI / build (pull_request) Successful in 6s
7e4743c71e
- Separate workflow file avoids polluting PR checks
- Triggers via workflow_run after CI passes on main
- Only deploys when CI conclusion == success
ci: add deploy script with logging and filedrop broadcast
All checks were successful
CI / lint (pull_request) Successful in 9s
CI / test (3.11) (pull_request) Successful in 23s
CI / test (3.12) (pull_request) Successful in 24s
CI / test (3.13) (pull_request) Successful in 24s
E2E Tests / e2e (pull_request) Successful in 16s
CI / build (pull_request) Successful in 7s
8f985b51d0
- scripts/deploy-alpha.sh: improved deploy script with:
  - Timestamped log file at /var/log/cobot-deploy.log
  - Filedrop broadcast to all agents on deploy success/failure
  - Version tracking (old → new) in log messages
  - Skip restart if already up to date
  - Commit message included in notifications
- Updated workflow to pull first, then run repo's script
fix: deploy script arg parsing and --pulled flag
All checks were successful
CI / lint (pull_request) Successful in 9s
CI / test (3.11) (pull_request) Successful in 23s
CI / test (3.12) (pull_request) Successful in 25s
CI / test (3.13) (pull_request) Successful in 25s
E2E Tests / e2e (pull_request) Successful in 15s
CI / build (pull_request) Successful in 6s
a1b49de853
- Fix arg parsing (was treating 'forgejo' as '--forgejo')
- Add --pulled flag to skip git pull when CI already pulled
- Workflow: pull first, then run script with --pulled
k9ert approved these changes 2026-02-27 08:11:50 +00:00
k9ert merged commit cb793d0161 into main 2026-02-27 08:13:52 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ultanio/cobot!118
No description provided.