{"id":15366885,"url":"https://github.com/cupcakearmy/drone-deploy","last_synced_at":"2025-04-15T12:33:30.367Z","repository":{"id":96682897,"uuid":"173998280","full_name":"cupcakearmy/drone-deploy","owner":"cupcakearmy","description":"Deployment Plugin for Drone","archived":false,"fork":false,"pushed_at":"2023-12-19T20:56:42.000Z","size":13,"stargazers_count":7,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T20:12:12.934Z","etag":null,"topics":["deployment","drone-ci","drone-plugin","plugin","sftp","ssh"],"latest_commit_sha":null,"homepage":null,"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/cupcakearmy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"cupcakearmy"}},"created_at":"2019-03-05T18:20:56.000Z","updated_at":"2024-07-25T04:08:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"7daf469b-c604-495d-9e8a-13c66c9893ad","html_url":"https://github.com/cupcakearmy/drone-deploy","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":0.1578947368421053,"last_synced_commit":"eac78b17d649e67e622b371b2ba5f7b5efd2e019"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fdrone-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fdrone-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fdrone-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fdrone-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cupcakearmy","download_url":"https://codeload.github.com/cupcakearmy/drone-deploy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072306,"owners_count":21208163,"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":["deployment","drone-ci","drone-plugin","plugin","sftp","ssh"],"created_at":"2024-10-01T13:20:09.208Z","updated_at":"2025-04-15T12:33:30.359Z","avatar_url":"https://github.com/cupcakearmy.png","language":"Python","funding_links":["https://github.com/sponsors/cupcakearmy"],"categories":[],"sub_categories":[],"readme":"# Drone Deployment Plugin\n\n## Quickstart 🚀\n\n```yaml\nkind: pipeline\nname: default\n\nsteps:\n  \n  - name: build\n    image: node:11-alpine\n    pull: always\n    commands:\n      - npm i\n      - npm run build:prod\n\n  - name: deploy\n    image: cupcakearmy/drone-deploy\n    pull: always\n    settings:\n      host: example.org\n      user: root\n      key:\n        from_secret: ssh_key\n      # or with a password\n      # password: S3cr37Sh1zzl3\n      port: 69\n      target: /my/web/root/project\n      sources:\n        # To copy all the files\n        # - . \n        - ./public\n        - ./docker-compose.yml\n        - ./docker-compose.prod.yml\n      commands:\n        - docker-compose -f docker-compose.yml -f docker-compose.prod.yml down\n        - docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d\n    when:\n      event: push\n      branch: master\n```\n\n### Details 📒\n\nThe plugins creates a tarball compressing all the files included inside of `sources`.\nThen the compressed tarball gets uploaded, extracted and deleted, leaving only the files specified by `sources` inside of the `target` folder.\nAfterwards all the commands inside of `commands` will get executed at the `target` directory.\n\n### Mapping remote environment variables 🗺\n\nSometimes it's usefull to have a remote env with a secret. Here is how.\n\n```yaml\nkind: pipeline\nname: default\n\nsteps:\n\n  # build...\n\n  - name: deploy\n    image: cupcakearmy/drone-deploy\n    pull: always\n    settings:\n      # host, user, port, key, when, target ...\n\n      myvar: 'Something'\n      somesecret:\n        from_secret: mysecret\n      envs:\n        - myvar\n        - somesecret\n      commands:\n        - echo $MYENV # Outputs: Something\n        - echo $SOMESECRET # Outputs: Whatever is saved in drone as `mysecret`\n```\n\n###### Note\nIf you don't want to specify single variables just use `envs: all` and all the parameters inside of `settings` will be available.\n\nAll the vars will be automagically be uppercased.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcupcakearmy%2Fdrone-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcupcakearmy%2Fdrone-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcupcakearmy%2Fdrone-deploy/lists"}