{"id":42468133,"url":"https://github.com/ptah-sh/deploy-action","last_synced_at":"2026-01-28T09:44:15.322Z","repository":{"id":254765199,"uuid":"842502981","full_name":"ptah-sh/deploy-action","owner":"ptah-sh","description":"A GitHub CI/CD action to ease the deployment of services via ptah.sh","archived":false,"fork":false,"pushed_at":"2024-10-17T18:38:49.000Z","size":273,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-20T04:14:51.054Z","etag":null,"topics":["fair-source","self-hosted"],"latest_commit_sha":null,"homepage":"https://ptah.sh","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ptah-sh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-08-14T13:37:27.000Z","updated_at":"2024-10-17T18:38:53.000Z","dependencies_parsed_at":"2024-08-26T01:04:05.136Z","dependency_job_id":null,"html_url":"https://github.com/ptah-sh/deploy-action","commit_stats":null,"previous_names":["ptah-sh/deploy-action"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ptah-sh/deploy-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptah-sh%2Fdeploy-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptah-sh%2Fdeploy-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptah-sh%2Fdeploy-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptah-sh%2Fdeploy-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptah-sh","download_url":"https://codeload.github.com/ptah-sh/deploy-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptah-sh%2Fdeploy-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["fair-source","self-hosted"],"created_at":"2026-01-28T09:44:14.286Z","updated_at":"2026-01-28T09:44:15.313Z","avatar_url":"https://github.com/ptah-sh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy Service to Ptah.sh\n\nThis GitHub Action launches a new deployment to the Docker Swarm cluster managed by Ptah.sh.\n\n## Inputs\n\n### `apiKey`\n\n**Required** The API Key for authentication with Ptah.sh.\n\n### `service`\n\n**Required** The slug of the service to deploy.\n\n### `processes`\n\n**Required** A YAML array containing process configurations for the deployment.\n\n### `serverAddress`\n\n**Optional** Custom server address. Default is \"https://ctl.ptah.sh\".\n\n## Outputs\n\n### `deploymentId`\n\nThe ID of the initiated deployment.\n\n## Example Usage\n\n```yaml\nname: Deploy to Ptah.sh\non:\n  push:\n    branches: [ main ]\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v3\n\n    - name: Build Docker image\n      run: docker build -t my-service:${{ github.sha }} .\n\n    - name: Push Docker image\n      run: docker push my-service:${{ github.sha }}\n\n    - name: Deploy to Ptah.sh\n      uses: ptah-sh/deploy-action@v1\n      with:\n        apiKey: ${{ secrets.PTAH_API_KEY }}\n        service: 'my-service-slug'\n        processes: |\n          - name: svc\n            workers:\n              - name: main\n                dockerImage: my-service:${{ github.sha }}\n            envVars:\n              - name: SENTRY_VERSION\n                value: ${{ github.sha }}\n      id: deploy\n    - name: Get the deployment ID\n      run: echo \"The deployment ID is ${{ steps.deploy.outputs.deploymentId }}\"\n```\n\n## Process Configuration\n\nThe `processes` input should be a YAML array where each item represents a process to be deployed. Each process can have the following properties:\n\n- `name` (required): The name of the process.\n- `workers` (optional): An array of worker configurations. Each worker should have a `name` and a `dockerImage` (optional).\n- `envVars` (optional): An array of environment variables for the process. Each environment variable should have a `name` and a `value`.\n\n## Error Handling\n\nThe action will fail if:\n\n- The input YAML for processes is invalid.\n- The processes array is empty.\n- Any process doesn't meet the validation criteria.\n- The API call to Ptah.sh fails.\n\nWhen the action fails, it will output an error message describing the problem.\n\n## Development\n\nTo test the action locally, you can use the following command:\n\n```bash\nINPUT_PROCESSES=$(cat \u003c\u003cEOF\n- name: web\n  workers:\n    - name: main\n      dockerImage: your-service:latest\n  envVars:\n    - name: ENV\n      value: production\nEOF\n)\n\nINPUT_API_KEY=your_api_key INPUT_SERVICE=your-service-slug INPUT_PROCESSES=\"$INPUT_PROCESSES\" INPUT_SERVER_ADDRESS=https://custom.ptah.sh node index.js\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptah-sh%2Fdeploy-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptah-sh%2Fdeploy-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptah-sh%2Fdeploy-action/lists"}