You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# GoDaddy GitHub Action for Managed WordPress Deployment
2
2
3
3
## Overview
4
4
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
6
9
7
10
## Features
8
11
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.
14
17
15
18
## Usage
16
19
17
-
### 1. **Add the Action to Your Workflow**
20
+
### 1. Add the Action to Your Workflow
18
21
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:
20
23
21
24
```yaml
22
25
name: Deploy WordPress
@@ -25,25 +28,26 @@ on:
25
28
workflow_dispatch:
26
29
inputs:
27
30
deployment_dest:
28
-
description: 'Target server directory, leave blank for root directory'
31
+
description: 'Target server directory; leave blank for the root directory'
| `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:
77
81
78
82
```bash
79
83
cat ~/.ssh/id_rsa | base64
80
84
```
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.)
81
86
82
-
Set the output as `SSH_PRIVATE_KEY` in GitHub Secrets.
83
-
84
-
## License
87
+
### For additional troubleshooting:
85
88
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.
87
92
88
-
## Contributing
93
+
### License
89
94
90
-
Feel free to open issues or submit PRs for improvements!
95
+
This GitHub Action is licensed under the MIT License.
91
96
92
-
## Support
97
+
### Contributing
93
98
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.
95
100
101
+
## Support
102
+
For additional help or support, please open an issue in this repository.
0 commit comments