|
1 | 1 | # Dokploy Deployment GitHub Action |
2 | 2 |
|
3 | | -This GitHub Action triggers a deployment on Dokploy. |
| 3 | +This GitHub Action triggers a deployment on Dokploy using the latest API format. |
4 | 4 |
|
5 | | -## Inputs |
6 | | - |
7 | | -### `auth_token` |
| 5 | +> **Note**: This is an updated fork of the original `benbristow/dokploy-deploy-action` which is outdated and uses deprecated authentication methods. This version uses the current Dokploy API with `x-api-key` authentication. |
8 | 6 |
|
9 | | -**Required** The Dokploy API key (used as x-api-key header). |
| 7 | +## Inputs |
10 | 8 |
|
11 | | -### `application_id` |
| 9 | +| Input | Description | Required | Example | |
| 10 | +|-------|-------------|----------|---------| |
| 11 | +| `dokploy_url` | Dokploy dashboard URL (no trailing slash) | ✅ | `https://dokploy.example.com` | |
| 12 | +| `auth_token` | Dokploy API key | ✅ | `your-api-key-here` | |
| 13 | +| `application_id` | Dokploy application ID | ✅ | `app-123456` | |
12 | 14 |
|
13 | | -**Required** The Dokploy application ID. |
| 15 | +## Setup |
14 | 16 |
|
15 | | -### `dokploy_url` |
| 17 | +1. [**Get your Dokploy API Key**](https://docs.dokploy.com/docs/core/auto-deploy#steps-to-deploy-using-api) |
16 | 18 |
|
17 | | -**Required** Dokploy dashboard URL (this should have the Dokploy API accessible at /api) - no trailing backslash. |
| 19 | +2. [**Find your Application ID**](https://docs.dokploy.com/docs/core/auto-deploy#steps-to-deploy-using-api) |
18 | 20 |
|
19 | | -e.g. `https://server.example.com` |
| 21 | +3. **Set up GitHub Secrets**: |
| 22 | + - Go to your repository → Settings → Secrets and variables → Actions |
| 23 | + - Add the following secrets: |
| 24 | + - `DOKPLOY_URL`: Your Dokploy instance URL |
| 25 | + - `DOKPLOY_API_KEY`: Your API key from step 1 |
| 26 | + - `DOKPLOY_APPLICATION_ID`: Your application ID from step 2 |
20 | 27 |
|
21 | 28 | ## Usage |
22 | 29 |
|
23 | | -To use this action, include it in your workflow file as follows: |
| 30 | +Add this action to your workflow file (e.g., `.github/workflows/deploy.yml`): |
24 | 31 |
|
25 | 32 | ```yaml |
26 | | -name: Dokploy Deployment Workflow |
| 33 | +name: Deploy to Dokploy |
27 | 34 |
|
28 | | -on: [push] |
| 35 | +on: |
| 36 | + push: |
| 37 | + branches: [ main ] # Deploy on push to main branch |
29 | 38 |
|
30 | 39 | jobs: |
31 | 40 | deploy: |
32 | 41 | runs-on: ubuntu-latest |
| 42 | + |
33 | 43 | steps: |
34 | 44 | - name: Checkout code |
35 | 45 | uses: actions/checkout@v4 |
36 | 46 |
|
37 | | - - name: Dokploy Deployment |
| 47 | + - name: Deploy to Dokploy |
38 | 48 | uses: ahmedabdou14/dokploy-deploy-action@v1.0.0 |
39 | 49 | with: |
| 50 | + dokploy_url: ${{ secrets.DOKPLOY_URL }} |
40 | 51 | auth_token: ${{ secrets.DOKPLOY_API_KEY }} |
41 | 52 | application_id: ${{ secrets.DOKPLOY_APPLICATION_ID }} |
42 | | - dokploy_url: ${{ secrets.DOKPLOY_URL }} |
43 | | -``` |
44 | | -
|
45 | | -## Contributing |
46 | | -
|
47 | | -Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests. |
48 | | -
|
49 | | -
|
50 | | -## License |
51 | | -
|
52 | | -This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
| 53 | +``` |
0 commit comments