{"id":29733965,"url":"https://github.com/alkaison/universal-frontend-deployer","last_synced_at":"2026-02-05T21:31:22.974Z","repository":{"id":305697911,"uuid":"1021270344","full_name":"Alkaison/Universal-Frontend-Deployer","owner":"Alkaison","description":"Reusable GitHub Actions workflows for secure, automated frontend deployments with rollback, health checks, and Slack alerts. Plug-and-play modules designed for React, Vite, Next.js, and other modern JS frameworks.","archived":false,"fork":false,"pushed_at":"2025-07-21T13:49:13.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-22T11:46:19.367Z","etag":null,"topics":["deployment-automation","frontend-automation","github-actions","github-workflows","health-check-automation","notification-workflow","slack-notifications","slack-webhook","workflow-automation"],"latest_commit_sha":null,"homepage":"https://github.com/Alkaison","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alkaison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T06:40:13.000Z","updated_at":"2025-08-20T06:23:06.000Z","dependencies_parsed_at":"2025-07-21T15:41:41.710Z","dependency_job_id":"ba38dd7e-467e-4f5c-8513-fe62d8c91b9a","html_url":"https://github.com/Alkaison/Universal-Frontend-Deployer","commit_stats":null,"previous_names":["alkaison/universal-frontend-deployer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Alkaison/Universal-Frontend-Deployer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkaison%2FUniversal-Frontend-Deployer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkaison%2FUniversal-Frontend-Deployer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkaison%2FUniversal-Frontend-Deployer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkaison%2FUniversal-Frontend-Deployer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alkaison","download_url":"https://codeload.github.com/Alkaison/Universal-Frontend-Deployer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkaison%2FUniversal-Frontend-Deployer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29135047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T20:50:26.975Z","status":"ssl_error","status_checked_at":"2026-02-05T20:49:26.082Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment-automation","frontend-automation","github-actions","github-workflows","health-check-automation","notification-workflow","slack-notifications","slack-webhook","workflow-automation"],"created_at":"2025-07-25T10:38:25.270Z","updated_at":"2026-02-05T21:31:22.933Z","avatar_url":"https://github.com/Alkaison.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛠️ Frontend Deployment Standard\n\nAll frontend applications must follow the structure and guidelines below to ensure consistency, security, and automation readiness.\n\n- Complete setup instructions are [here](./SETUP.md \"Setup File\").\n- Slack Incoming Webhooks setup guide is [here](https://api.slack.com/messaging/webhooks).\n\n## 📁 Folder Structure\n\n- All frontend repositories must be cloned to:\n\n```yaml\n/home/\u003cusername\u003e/\u003cproject-name\u003e/\n```\n\n- The application is built and served from this location.\n\n```yaml\n/home/\u003cusername\u003e/\u003cproject-name\u003e/dist/\n```\n\n\u003e We are considering the default build folder to be named as \"dist\", if it's different in your case, replace every instance of \"dist\" to the build folder name of yours as per the project setup.\n\n## ✅ Prerequisites\n\n### Server Setup\n\n- Ubuntu 20.04+ (recommended)\n- SSH access with password or private key authentication\n- Web server installed (e.g., **nginx**)\n- Node.js and npm installed **globally** on the system\n- Optional: PM2 for SSR/Next.js (if needed)\n\n\u003e ℹ️ Ensure Node.js and npm are installed using [NodeSource](https://github.com/nodesource/distributions) or your preferred method.\n\n\u003e Use the same version used by the frontend team for local builds. Ask them directly if unsure.\n\n## 📦 Project Standards\n\n### Required Files\n\nEach repository **must** include:\n\n- `package.json`\n- `package-lock.json`\n- `.gitignore` (with `dist/` ignored)\n- Proper build scripts\n\n### Package.json Standards\n\nAll frontend projects must define these scripts:\n\n```json\n\"scripts\": {\n  \"build\": \"vite build\",\n  \"dev\": \"vite\",\n  \"preview\": \"vite preview\"\n}\n```\n\nOther frameworks like Next.js can override with:\n\n```json\n\"build\": \"next build \u0026\u0026 next export\"\n```\n\n## 🔧 Breakdown of Script Modules (Reusable Blocks)\n\n1. `pull_and_build.yml`\n\nPurpose: Pull the latest code on the server and build the frontend.\n\nTasks:\n\n- SSH into the server\n- Pull from GitHub or re-clone cleanly\n- Run `npm ci` and `npm run build`\n- Move the existing `dist/` to `dist_prev/`\n- Build a new app into `dist/`\n- Reload nginx to serve the updated files\n\n2. `rollback.yml`\n\nPurpose: Restore the last known good build if anything fails (e.g., broken deployment, failed health check).\n\nTasks:\n\n- Delete the broken `dist/`\n- Move `dist_prev/` back to `dist/`\n- Reload nginx\n\n3. `slack_alert_and_healthcheck.yml`\n\nPurpose:\n\n- Ping the deployed URL (via `curl` or `http_status`)\n- Send a Slack message using a webhook\n\nScenarios:\n\n- ✅ If the site is healthy → send a **\"Deployed Successfully\"** message\n- ❌ If the site fails health check:\n  - Trigger `rollback.yml`\n  - Send a **\"Deployment Failed. Rolled back.\"** alert\n\n## 🧩 Main Controller Workflow (`deploy.yml`)\n\nThis is the central orchestrator for the deployment pipeline.\n\n**Steps:**\n\n1. Triggered on push to `\u003cbranch_name\u003e` (or manual dispatch)\n1. Calls `pull_and_build.yml`\n1. Calls `slack_alert_and_healthcheck.yml`\n1. If health check fails, runs `rollback.yml`\n1. Slack alert is always sent (on success or failure)\n\n## 📡 Slack Alerts\n\nAll deployment jobs send a Slack message to the configured webhook.\n\nYou will receive:\n\n- ✅ Success notifications\n- ❌ Failure notifications (including cause and rollback confirmation)\n\nMake sure the `SLACK_WEBHOOK_URL` is added to the repo secrets.\n\n## 💬 Need Help?\n\nContact [Alkaison](https://github.com/Alkaison) for help in setup or further improvements as per your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkaison%2Funiversal-frontend-deployer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falkaison%2Funiversal-frontend-deployer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkaison%2Funiversal-frontend-deployer/lists"}