Skip to main content

pydeploy

Automatically deploy git repositories

Build Status

Background

I made this tool because I need something to automatically deploy my web services on staging/testing server. However, I don't really need it to be robust like Jenkins. I only need a simple script that just easily customizable, lightweight, and easy to configure.

Installation

pip install pydeploycli

Usage

  1. Create a config file in JSON format like this

    {
        "pre_script": ["echo 1", "echo 2"],
        "post_script": ["python3 app.py"],
        "remote": "<remote>",
        "branch": "<branch>",
        "notifier": {
            "type": "<discord / slack>",
            "receiver": "<webhook>"
        }
    }
    

    pre_script are bash commands that are executed before pull. post_scripts are the same but executed after pull. You can ignore the notifier part if you don't want to be notified. Save this config to file.

  2. Clone your repository, move to your repository directory. If your repository is private, you can store your username & password first or use ssh.

  3. Execute pyDeploy in that directory

    pydeploy "path/to/config/file"
    

    Your webhook will be running on

    http://IP:9999/<endpoint>
    

    endpoint will be printed when you execute pydeploy you can also set your own endpoint by providing --endpoint option

  4. Copy that webhook URL and put it on your github webhook setting. Select the content type to json.

  5. Done! Now your server will automatically pull and execute your predefined script.

Issues? Changes?

Just open an issue/pull request. Thanks

Metadata

Release files for PyDeployCLI 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyDeployCLI 0.0.3
File Size Uploaded Provenance Actions
PyDeployCLI-0.0.3.tar.gz 6.1 kB Without provenance Details for PyDeployCLI-0.0.3.tar.gz

Release files / PyDeployCLI-0.0.3.tar.gz

Download URL PyDeployCLI-0.0.3.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dc2193322641833492ea553db9fd3364df53fe34c23614860b779036a68ed758
BLAKE2b-256 checksum
How to use checksums
2fb469922746b3efb1308713f1c818272938f55d91a00f4003834e49668a9c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Security for PyDeployCLI 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page