{"id":18887990,"url":"https://github.com/codex-team/deployserver","last_synced_at":"2025-04-14T23:08:38.475Z","repository":{"id":53557378,"uuid":"98193144","full_name":"codex-team/deployserver","owner":"codex-team","description":"Deploy your project automatically when git branch was updated.","archived":false,"fork":false,"pushed_at":"2021-03-24T15:39:55.000Z","size":36,"stargazers_count":28,"open_issues_count":6,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T23:08:17.648Z","etag":null,"topics":["automated-deployment","bitbucket","github","module","python","server","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codex-team.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-24T13:22:39.000Z","updated_at":"2024-06-13T01:07:56.000Z","dependencies_parsed_at":"2022-08-20T14:10:59.442Z","dependency_job_id":null,"html_url":"https://github.com/codex-team/deployserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codex-team%2Fdeployserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codex-team%2Fdeployserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codex-team%2Fdeployserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codex-team%2Fdeployserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codex-team","download_url":"https://codeload.github.com/codex-team/deployserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975316,"owners_count":21192209,"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":["automated-deployment","bitbucket","github","module","python","server","webhook"],"created_at":"2024-11-08T07:41:04.063Z","updated_at":"2025-04-14T23:08:38.447Z","avatar_url":"https://github.com/codex-team.png","language":"Python","readme":"deployserver\n============\n\nDeploy your project automatically when git branch was updated via GitHub or BitBucket webhooks.\n\nUsage\n-----\nInstall deployserver from pip.\n\n.. code:: bash\n\n    $ pip3 install deployserver\n\n\nTo start your first autodeploy daemon you need to create `deploy.py` script file in your project.\n\n.. code:: python\n\n    import deployserver\n\n\n    deployserver.init({\n        'server_address': 'http://mydomain.com',\n        'port': 1234,\n        'deploy': 'cd /var/www/myProject;' \\\n                  'git pull;'\n    })\n\nTo start autodeploy with multiple branches\n\n.. code:: python\n\n    import deployserver\n\n\n    deployserver.init({\n        'server_address': 'http://mydomain.com',\n        'port': 1234,\n        'branches': [\n            {\n                'name': 'master',\n                'script': '/var/www/myProject/master-deploy.sh'\n            },\n            {\n                'name': 'deploy/test',\n                'script': '/var/www/myProject/test-deploy.sh',\n            },\n            {\n                'regexp': r'feature/.*',\n                'script': '/var/www/myProject/feature-deploy.sh'\n            }\n        ]\n    })\n\nThen you need to run this script.\n\n.. code:: bash\n\n    $ python3 deploy.py\n\nIf you want to run autodeploy daemon in background, use Screen.\n\n.. code:: bash\n\n    $ screen -dmS deployserver_myProject python3 deploy.py\n\nScreen docs: https://www.gnu.org/software/screen/manual/screen.html\n\nWebhooks\n--------\n\nCurrently support three types of webhooks:\n\n- `GitHub \u003chttps://developer.github.com/webhooks/\u003e`_\n- `BitBucket \u003chttps://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html\u003e`_\n- Custom\n\nCustom Webhooks\n~~~~~~~~~~~~~~~\n\nSend HTTP POST request to the callback URL with JSON payload.\n\n.. code:: text\n\n    {\n        \"branch\": \"master\",\n    }\n\n\nInitial params\n--------------\n\nFor initiation deployserver params dict is required.\n\nserver\\_address : string\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nEnter a domain name for this server with http protocol.\n\n.. code:: python\n\n    'server_address': 'http://mydomain.com'\n\n.. code:: python\n\n    'server_address': 'http://8.8.8.8'\n\n.. code:: python\n\n    'server_address': 'http://0a1b2c3d.ngrok.io'\n\nport : integer\n~~~~~~~~~~~~~~\n\ndeployserver will listen this local port.\n\n.. code:: python\n\n    'port': 2345\n\ndeploy : string\n~~~~~~~~~~~~~~~\n\nBash commands sequence which should be initiated on branch update.\n\n.. code:: python\n\n    'deploy': 'cd /var/www/myProject;' \\\n              'git pull;'\n\n.. code:: python\n\n    'deploy': '/var/www/myProject/deploy.sh'\n\n(optional) host : string\n~~~~~~~~~~~~~~~~~~~~~~~~\n\ndeployserver will listen this local address (default 0.0.0.0).\n\n.. code:: python\n\n    'host': '127.0.0.1'\n\n(optional) branch : string\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhich branch push event should initiate deploy function.\n\n.. code:: python\n\n    # default\n    'branch': 'master'\n\n.. code:: python\n\n    'branch': 'current-sprint'\n\n.. code:: python\n\n    'branch': 'ver2'\n\n(optional) uri : string\n~~~~~~~~~~~~~~~~~~~~~~~\n\nCallback uri.\n\n.. code:: python\n\n    # default\n    'uri': '/callback'\n\n.. code:: python\n\n    'uri': '/'\n\n(optional) secret_token : string\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSecret token. Check if it is set.\n\n.. code:: python\n\n    # default\n    'secret_token': None\n\n.. code:: python\n\n    'secret_token': 'a96529a4af7864e7f6e11035d10b7db5'\n\n\nRequirements\n------------\n- Python \u003e= 3.5\n- aiohttp\n- asyncio\n\nLinks\n-----\n\nRepository: https://github.com/codex-team/deployserver\n\nReport a bug: https://github.com/codex-team/deployserver/issues\n\nPyPI Package: https://pypi.python.org/pypi/deployserver\n\nCodeX Team: https://ifmo.su\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodex-team%2Fdeployserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodex-team%2Fdeployserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodex-team%2Fdeployserver/lists"}