Workflow Overview
The deployment workflow is defined in.github/workflows/deploy.yml:1 and runs automatically to keep the website synchronized with the eGO Real Estate API.
Deployment Triggers
The workflow runs on three triggers:Trigger Explanation
- Push to main - Deploys immediately when code is pushed to the main branch
- Scheduled - Runs every 12 hours to fetch updated property listings (reduced from hourly to avoid eGO API rate limiting)
- Manual dispatch - Can be triggered manually from GitHub Actions UI
The schedule was reduced from every hour to every 12 hours to prevent HTTP 429 (rate limit) errors from the eGO API.
Workflow Steps
The workflow consists of six automated steps:1. Checkout Code
2. Install Node.js
3. Install Dependencies
npm ci (clean install) for reproducible builds based on package-lock.json.
4. Build Project
5. Validate Build
- Checks if property cards exist in the generated HTML
- Aborts deployment if properties are missing
- Protects against deploying broken builds to production
6. Deploy via SFTP
dist/ folder to cdmon hosting via SFTP, overwriting existing files.
Required GitHub Secrets
Four secrets must be configured in the GitHub repository settings:| Secret | Purpose | Example |
|---|---|---|
SFTP_HOST | cdmon server hostname | ftp.example.com |
SFTP_USER | SFTP username | adosa_user |
SFTP_PWD | SFTP password | secure_password |
PUBLIC_EGO_API_TOKEN | eGO Real Estate API token | u2fW9rOg0Oz5rPGV... |
Adding Secrets
- Go to GitHub repository Settings → Secrets and variables → Actions
- Click New repository secret
- Add each secret with its name and value
- Secrets are encrypted and not visible after creation
Continuous Deployment Strategy
The workflow implements a continuous deployment strategy:- Automatic updates - Properties are refreshed every 12 hours without manual intervention
- Instant deploys - Code changes on
mainbranch deploy immediately - Build validation - Prevents broken deployments with automated checks
- Zero-downtime - Files are overwritten atomically via SFTP
Benefits
- Fresh content - Properties are never more than 12 hours out of date
- No manual work - Developers don’t need to manually deploy
- Safety checks - Validation prevents deploying incomplete builds
- Audit trail - All deployments are logged in GitHub Actions
Monitoring Deployments
View deployment status:- Go to the repository’s Actions tab
- Select the “Deploy to cdmon (SFTP)” workflow
- View run history, logs, and success/failure status
Typical Deployment Time
- Total workflow duration: 2-3 minutes
- Build step: 30-60 seconds
- SFTP upload: 60-90 seconds (depending on file count)
Manual Deployment
To trigger a deployment manually:- Go to Actions → Deploy to cdmon (SFTP)
- Click Run workflow
- Select the
mainbranch - Click Run workflow
- Forcing an immediate property update
- Testing deployment after configuration changes
- Recovering from a failed scheduled run
Troubleshooting
Deployment Failing on Validation
Error: “Build inválido: NO se encontraron propiedades” Cause: eGO API returned no properties or API request failed Solution:- Check eGO API status
- Verify
PUBLIC_EGO_API_TOKENsecret is valid - Review build logs for API errors
SFTP Connection Errors
Error: “Failed to connect to SFTP” Cause: Invalid credentials or cdmon server issues Solution:- Verify
SFTP_HOST,SFTP_USER, andSFTP_PWDsecrets - Test SFTP connection manually using credentials
- Check if cdmon hosting is operational