Commit Graph

7 Commits

Author SHA1 Message Date
juanatsap cdb6cbd2b0 fix: improve SSH key handling with validation and debugging
- Use printf instead of echo for proper SSH key formatting
- Add ssh-keygen validation before attempting connection
- Show first 50 chars of key on validation failure for debugging
- Maintains proper line endings and key structure

This will help identify if the SSH_PRIVATE_KEY secret is malformed.
2025-10-31 12:26:37 +00:00
juanatsap eb920baace fix: resolve SSH key and errcheck linter issues
Deploy workflow fixes:
- Add tr -d '\r' to strip carriage returns from SSH key
- Set chmod 700 on .ssh directory for proper permissions
- Suppress ssh-keyscan stderr output

Handler code fixes:
- Check json.Encode() return values in errors.go (2 locations)
- Check json.Encode() return value in health.go
- Add log import to health.go
- Log encoding errors instead of silently ignoring

Resolves:
- "Load key: error in libcrypto" SSH deployment error
- 3 errcheck linter warnings
2025-10-31 12:23:48 +00:00
juanatsap b167378526 fix: update workflows for Go 1.25.1 and SSH deployment
Test workflow:
- Upgrade golangci-lint-action from v6 to v7
- v7 is required for golangci-lint v2.x support
- Remove skip-cache as v7 handles caching better

Deploy workflow:
- Fix SSH heredoc to use unquoted ENDSSH delimiter
- Allows environment variables to expand in remote session
- Fixes "Permission denied" by properly passing REPO_PATH and SERVICE_NAME
2025-10-31 12:20:42 +00:00
juanatsap 73155e3900 chore: add manual deployment trigger to GitHub workflow
- Added workflow_dispatch trigger to enable manual deployments from GitHub Actions UI
- Maintains existing automated deployments on main branch pushes
- Improves operational flexibility by allowing ad-hoc deployments when needed
2025-10-31 11:54:26 +00:00
root e5e09926f1 Fix deployment workflow defaults for CV project
- Set correct SERVICE_NAME default: cv
- Set correct REPO_PATH default: /home/txeo/Git/yo/cv
- Workflow now pulls code and restarts service correctly
2025-10-31 11:20:49 +00:00
juanatsap a5804936ba from mac 2025-10-31 11:06:38 +00:00
root 5e38292d2e Add GitHub Actions deployment workflow
- Add deployment workflow with test, build, and deploy jobs
- Add testing workflow for PRs
- Add deployment scripts (deploy, healthcheck, rollback)
- Add systemd service configuration
- Update Makefile with CI/CD targets
- Add comprehensive deployment documentation
2025-10-30 12:19:57 +00:00