Skip to content

Commit d220f9e

Browse files
updated README.md
1 parent d706b60 commit d220f9e

File tree

1 file changed

+49
-42
lines changed

1 file changed

+49
-42
lines changed

README.md

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
# GoDaddy GitHub Action for Wordpress deployment
1+
# GoDaddy GitHub Action for Managed WordPress Deployment
22

33
## Overview
44

5-
This GitHub Action automates WordPress deployment using `rsync` over SSH. It creates a tar archive of modified files, transfers it to the remote server, and executes a deployment script. The action supports post-deployment commands, WordPress health checks, and automatic rollback in case of failures.
5+
This GitHub Action automates the deployment of your WordPress site by leveraging `rsync` over SSH. It packages only modified files into a tar archive, transfers them to your remote server, and executes a tailored deployment script. In addition, the action supports:
6+
- Post-deployment commands
7+
- WordPress health checks with automatic rollback upon failure
8+
- Secure authentication using an SSH private key
69

710
## Features
811

9-
- **Deploy only changed files** using `rsync --checksum`
10-
- **Remove deleted files** from the repository on the server
11-
- **Execute post-deployment commands**
12-
- **Perform WordPress health checks** and rollback if necessary
13-
- **Secure authentication** via SSH private key
12+
- **Deploy Only Changed Files:** Uses `rsync --checksum` to efficiently update only the modified files.
13+
- **Sync File Deletions:** Automatically removes files deleted from the repository on the server.
14+
- **Post-Deployment Commands:** Execute custom commands after deployment.
15+
- **WordPress Health Checks:** Monitor site health and trigger a rollback on failure.
16+
- **Secure SSH Authentication:** Ensures connectivity using your SSH private key.
1417

1518
## Usage
1619

17-
### 1. **Add the Action to Your Workflow**
20+
### 1. Add the Action to Your Workflow
1821

19-
Create a `.github/workflows/deploy.yml` file in your repository:
22+
Create a `.github/workflows/deploy.yml` file in your repository with the following content:
2023

2124
```yaml
2225
name: Deploy WordPress
@@ -25,25 +28,26 @@ on:
2528
workflow_dispatch:
2629
inputs:
2730
deployment_dest:
28-
description: 'Target server directory, leave blank for root directory'
31+
description: 'Target server directory; leave blank for the root directory'
2932
required: false
3033
enable_health_check:
31-
description: 'Enable wordpress health check?'
34+
description: 'Enable WordPress health check?'
3235
type: choice
3336
required: false
3437
default: "yes"
3538
options:
3639
- "yes"
3740
- "no"
41+
3842
jobs:
3943
deploy:
4044
runs-on: ubuntu-latest
4145
steps:
42-
- name: Checkout repository
46+
- name: Checkout Repository
4347
uses: actions/checkout@v3
4448

45-
- name: Deploy using GitHub Action
46-
uses: your-org/your-action-repo@v1
49+
- name: Deploy via GoDaddy GitHub Action
50+
uses: godaddy-wordpress/[email protected]
4751
with:
4852
remote_host: ${{ secrets.REMOTE_HOST }}
4953
ssh_user: ${{ secrets.SSH_USER }}
@@ -52,44 +56,47 @@ jobs:
5256
enable_health_check: ${{ github.event.inputs.enable_health_check }}
5357
```
5458
55-
## Inputs
59+
### 2. Configuration Inputs
5660
5761
| Name | Description | Required | Default |
58-
| ----------------------- | ------------------------------------ | -------- | ------- |
59-
| `remote_host` | The remote server IP or domain | ✅ Yes | - |
60-
| `ssh_user` | SSH username for authentication | ✅ Yes | - |
61-
| `ssh_private_key` | SSH private key for authentication | ✅ Yes | - |
62-
| `deployment_dest` | Remote WordPress directory | ❌ No | `.` |
63-
| `post_deploy_commands` | Commands to run after deployment | ❌ No | `''` |
64-
| `cleanup_deleted_files` | Remove deleted files from the server | ❌ No | `yes` |
65-
| `enable_health_check` | Perform a WordPress health check | ❌ No | `yes` |
66-
67-
## Requirements
68-
69-
- **Enable Git Deployment** for site from GoDaddy interface
70-
- **GitHub secrets configured** for `REMOTE_HOST`, `SSH_USER`, and `SSH_PRIVATE_KEY`
71-
72-
## Troubleshooting
73-
74-
### SSH Key Issues
75-
76-
Ensure the private key format is correct and matches the server's authorized keys:
62+
| ----------------------- | ------------------------------------ | -------- | ------ |
63+
| `remote_host` | The remote server IP or domain | ✅ Yes | - |
64+
| `ssh_user` | SSH username for authentication | ✅ Yes | - |
65+
| `ssh_private_key` | SSH private key for authentication | ✅ Yes | - |
66+
| `deployment_dest` | Remote WordPress directory | ❌ No | `''` |
67+
| `cleanup_deleted_files` | Remove deleted files from the server | ❌ No | `yes` |
68+
| `enable_health_check` | Perform a WordPress health check | ❌ No | `yes` |
69+
70+
71+
### Requirements
72+
- Git Deployment Enabled: Activate Git Deployment for your site via the GoDaddy control panel.
73+
- GitHub Secrets: Ensure the following secrets are configured in your repository:
74+
- `REMOTE_HOST`
75+
- `SSH_USER`
76+
- `SSH_PRIVATE_KEY`
77+
78+
### Troubleshooting
79+
SSH Key Issues
80+
If you experience authentication problems, verify that your private key is correctly formatted and matches the public key configured on your server. You can use the following command to view your SSH key in a base64-encoded format:
7781

7882
```bash
7983
cat ~/.ssh/id_rsa | base64
8084
```
85+
Copy the output and configure it as your repository's SSH_PRIVATE_KEY secret. (**Note:** You may have used a different name when creating your key. Please ammend the example to match your case.)
8186

82-
Set the output as `SSH_PRIVATE_KEY` in GitHub Secrets.
83-
84-
## License
87+
### For additional troubleshooting:
8588

86-
This action is licensed under the MIT License.
89+
- Double-check your remote host details.
90+
- Ensure that the user has the proper permissions on the remote server.
91+
- Consult the issues tab in this repository for similar problems and their resolution.
8792

88-
## Contributing
93+
### License
8994

90-
Feel free to open issues or submit PRs for improvements!
95+
This GitHub Action is licensed under the MIT License.
9196

92-
## Support
97+
### Contributing
9398

94-
For help, open an issue in the repository.
99+
Contributions, bug reports, and ideas for improvements are welcome! Please open an issue or submit a pull request for discussion.
95100

101+
## Support
102+
For additional help or support, please open an issue in this repository.

0 commit comments

Comments
 (0)