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
This commit is contained in:
root
2025-10-30 12:19:57 +00:00
parent ee354d1d35
commit 5e38292d2e
9 changed files with 1849 additions and 10 deletions
+45
View File
@@ -0,0 +1,45 @@
[Unit]
Description=CV Website Service
After=network.target
Wants=network-online.target
[Service]
Type=simple
User=txeo
Group=txeo
WorkingDirectory=/home/txeo/Git/yo/cv
ExecStart=/home/txeo/Git/yo/cv/cv-server
# Environment variables
Environment="GO_ENV=production"
Environment="PORT=1999"
Environment="HOST=0.0.0.0"
Environment="BASE_URL=https://juan.andres.morenorub.io"
Environment="TEMPLATE_HOT_RELOAD=false"
EnvironmentFile=-/home/txeo/Git/yo/cv/.env
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=false
ReadWritePaths=/home/txeo/Git/yo/cv/data
ReadOnlyPaths=/home/txeo/Git/yo/cv
# Resource limits
LimitNOFILE=65536
MemoryMax=512M
# Restart policy
Restart=always
RestartSec=5
StartLimitInterval=60
StartLimitBurst=3
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=cv
[Install]
WantedBy=multi-user.target