{"id":18887835,"url":"https://github.com/masterfermin02/cloudways-deployment","last_synced_at":"2025-06-10T22:36:51.453Z","repository":{"id":53788068,"uuid":"347459392","full_name":"masterfermin02/cloudways-deployment","owner":"masterfermin02","description":"A deployment tool written in PHP to deploy apps to cloudways.","archived":false,"fork":false,"pushed_at":"2021-03-23T14:25:23.000Z","size":46,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-31T12:21:58.007Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masterfermin02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-13T19:23:38.000Z","updated_at":"2021-04-28T20:39:39.000Z","dependencies_parsed_at":"2022-09-12T02:50:13.650Z","dependency_job_id":null,"html_url":"https://github.com/masterfermin02/cloudways-deployment","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fcloudways-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fcloudways-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fcloudways-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fcloudways-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masterfermin02","download_url":"https://codeload.github.com/masterfermin02/cloudways-deployment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fcloudways-deployment/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259165260,"owners_count":22815530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-08T07:39:53.271Z","updated_at":"2025-06-10T22:36:51.414Z","avatar_url":"https://github.com/masterfermin02.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://banners.beyondco.de/Cloudways%20deployment%20tool.png?theme=dark\u0026packageManager=composer+require\u0026packageName=masterfermin02%2Fcloud-ways-deploy\u0026pattern=architect\u0026style=style_1\u0026description=A+deployment+tool+written+in+PHP+to+deploy+apps+to+cloudways.\u0026md=1\u0026showWatermark=1\u0026fontSize=100px\u0026images=cloud-upload\" alt=\"Social Card of cloudways deployment tool\"\u003e\u003c/p\u003e\n\n# cloudways-deployment\n\n[![GitHub forks](https://img.shields.io/github/forks/masterfermin02/cloudways-deployment)](https://img.shields.io/github/issues/masterfermin02/cloudways-deployment)\n[![GitHub starts](https://img.shields.io/github/stars/masterfermin02/cloudways-deployment)](https://img.shields.io/github/stars/masterfermin02/cloudways-deployment)\n[![license](https://img.shields.io/github/license/masterfermin02/cloudways-deployment)](LICENSE.md)\n\nA deployment tool written in PHP to deploy apps to cloudways.\n\n## Installation and usage\n\nThis package requires PHP 8 or higher.\n\n- Install by composer\n```bash\ncomposer require masterfermin02/cloud-ways-deploy\n```\n# Use\n- Config your git webhook [doc](https://docs.github.com/en/developers/webhooks-and-events/creating-webhooks)\n- Deploy example script:\n```php\n\u003c?php declare(strict_types=1);\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse Dotenv\\Dotenv;\n\n$dotenv = Dotenv::createImmutable(__DIR__ . '/../');\n$dotenv-\u003eload();\n\nuse App\\Input;\nuse CloudWays\\Deploy\\Client;\nuse CloudWays\\Requester;\nuse CloudWays\\Server;\n\n$apiKey = $_ENV['API_KEY']; // API key clouds ways key\n$API_URL = $_ENV['API_URL']; // your cloudways server api url\n$email = $_ENV['DEPLOYMENT_EMAIL']; // your email to receive notifiy on deploy finish\n$input = Input::create(array_merge($_GET, $_POST));\n\n// git web hook example url http://yourserver/deployApplication.php?server_id=1234\u0026app_id=1234\u0026git_url=git_url\u0026branch_name=master\u0026deploy_path=path_to_your_app\n$gitPullResponse = Client::create($email, $apiKey, Requester::create($API_URL))\n-\u003eexecute(Server::create(\n    $input-\u003eget('server_id'),\n    $input-\u003eget('git_url'),\n    $input-\u003eget('branch_name'),\n    $input-\u003eget('app_id')\n));\n\necho (json_encode($gitPullResponse));\n```\n\n## Testing\n\nRun the tests with:\n\n``` bash\ncomposer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Credits\n\n- [Fermin Perdomo](https://github.com/masterfermin02)\n- [All Contributors](../../contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterfermin02%2Fcloudways-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasterfermin02%2Fcloudways-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterfermin02%2Fcloudways-deployment/lists"}