{"id":42326577,"url":"https://github.com/dvrpc/automated-deployments-api","last_synced_at":"2026-01-27T13:10:51.310Z","repository":{"id":221565845,"uuid":"694232471","full_name":"dvrpc/automated-deployments-api","owner":"dvrpc","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-14T19:50:44.000Z","size":95,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-14T21:23:21.667Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/dvrpc.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-20T15:28:46.000Z","updated_at":"2025-11-14T19:50:49.000Z","dependencies_parsed_at":"2024-06-28T19:14:04.838Z","dependency_job_id":null,"html_url":"https://github.com/dvrpc/automated-deployments-api","commit_stats":null,"previous_names":["dvrpc/automated-deployments-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dvrpc/automated-deployments-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvrpc%2Fautomated-deployments-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvrpc%2Fautomated-deployments-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvrpc%2Fautomated-deployments-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvrpc%2Fautomated-deployments-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvrpc","download_url":"https://codeload.github.com/dvrpc/automated-deployments-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvrpc%2Fautomated-deployments-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28813296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: 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":[],"created_at":"2026-01-27T13:10:50.821Z","updated_at":"2026-01-27T13:10:51.305Z","avatar_url":"https://github.com/dvrpc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automated Deployments API\n\nThis API contains just two endpoints:\n  - `/api/ad`: a POST endpoint to receive webhooks from GitHub. (For information about the headers and payload of a GitHub webhook, see \u003chttps://docs.github.com/en/webhooks/webhook-events-and-payloads\u003e.)\n  - `/api/status`: a GET endpoint for monitoring.\n\nWhen a webhook is successfully received by the API, it will attempt to redeploy the code by running an Ansible playbook on the \u003ca href=\"https://github.com/dvrpc/cloud-ansible?tab=readme-ov-file#controller\"\u003econtroller\u003c/a\u003e, using a tag that associates a set of tasks in the playbook with the repository the webhook is coming from. The results of the attempted deployment will be emailed to those in `EMAIL_RECEIVERS` (see below).\n\nThe program requires three environment variables in an ignored .env file:\n  - `GITHUB_TOKEN`. This is kept as a secret in the \"ad_api\" role in the cloud-ansible project. (It also needs to be set in the repository the webhook is being called on - see below.)\n  - `PATH_TO_ANSIBLE_PROJECT`. The path to the Ansible project on the controller (where the cloud-ansible repository is cloned to).\n  - `EMAIL_RECEIVERS`. Those who should be emailed the results of an attempted redeployment, e.g. `EMAIL_RECEIVERS=\"Person1 \u003cperson1@dvrpc.org\u003e,Person2 \u003cperson2@dvrpc.org\u003e\"`.\n\n## How to Use the API for Deployments\n\n1. Set up a webhook on the repository of the code to be deployed.\n    1. go to Settings of the repository in GitHub\n    2. select Webhooks\n    3. click on the button \"Add Webhook\"\n    4. Fill out the form:\n      - use \"https://controller.cloud.dvrpc.org/api/ad\" for the payload url\n      - select \"application/json\" for the content type\n      - add secret mentioned above (GITHUB_TOKEN env var)\n      - for \"which events would you like to trigger with this webook\", chose \"Let me select individual events\", click the checkbox for \"Pull requests\" and **uncheck** the default of \"Pushes\".\n    - click the \"Add webhook\" button at the button to activate it.\n2. In the code for this API (in src/main.rs), add the repo name/tag in the code and redeploy. (This is currently hard-coded, but probably shouldn't be.)\n\nNOTE: upon setting up the webhook on a repository, it will attempt to ping the server. This will be reported as a failure, as we reject anything that's not a pull request with a certain body. It can be ignored.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvrpc%2Fautomated-deployments-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvrpc%2Fautomated-deployments-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvrpc%2Fautomated-deployments-api/lists"}