|
| 1 | +# WordPress SSH Git CI |
| 2 | + |
| 3 | +**Creator** Ryan Valizan -- [@devnet](https://github.com/devnetkc) |
| 4 | +**Tags:** git, WordPress, BASH, CI, Azure Azure DevOps, SiteGround, SSH, Azure Pipeline |
| 5 | +**License:** GPLv3 |
| 6 | +**License URI:** [https://www.gnu.org/licenses/gpl-3.0.en.html](https://www.gnu.org/licenses/gpl-3.0.en.html) |
| 7 | + |
| 8 | +## Description |
| 9 | + |
| 10 | +### ✨ Automate your WordPress and git repository release pipeline |
| 11 | + |
| 12 | +If there's SSH & Git, you can sync WordPress and Azure DevOps using git. |
| 13 | + |
| 14 | +Let your CI Pipeline mangage getting those plugin updates from your unix WordPres server. |
| 15 | + |
| 16 | +<!-- markdownlint-disable --> |
| 17 | +#### Requirements: |
| 18 | +<!-- markdownlint-restore --> |
| 19 | + |
| 20 | +- **Webserver have git capability** -- think this is the most important one |
| 21 | +- A method to store your secrete variables such as |
| 22 | + - username |
| 23 | + - password/token |
| 24 | +- SSH access to execute scripts on WordPress server |
| 25 | + - *note: `cron` can serve as a slower alternative to SSH* |
| 26 | +- Some kind of CI pipeline or `cron` job to hook into after a branch update event triggers an agent to run the script remotely |
| 27 | + |
| 28 | +<!-- markdownlint-disable --> |
| 29 | +#### What it has: |
| 30 | +<!-- markdownlint-restore --> |
| 31 | + |
| 32 | +- Parameter options for dynamic use |
| 33 | +- Separated functions |
| 34 | +- Is executed through an ssh call to your WordPress web server |
| 35 | + |
| 36 | +<!-- markdownlint-disable --> |
| 37 | +#### What it does is: |
| 38 | +<!-- markdownlint-restore --> |
| 39 | + |
| 40 | +- Check a git repo on a WordPress web server for changes |
| 41 | +- Stashes changes before working on merges |
| 42 | +- Pulls in latest release/master branch from development repository — on Azure DevOps, GitHub, BitBucket, etc. |
| 43 | +- Merges new changes from DevOps into WordPress Live branch |
| 44 | +- Returns WordPress updates and changes using git stash pop |
| 45 | +- Commits the new changes on top of the latest master branch head |
| 46 | +- Pushes WordPress live branch back to the development repository for the team to handle PR to DevOps master. |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +Essentially, it allows WordPress developers to be more hands off with their shared hosting wordpress server backends, while still fully benefitting from any of the many source control repository and project board sites for git — but while using WordPress at the same time. |
| 51 | + |
| 52 | +## Contributing |
| 53 | + |
| 54 | +Contrabutions are welcome! |
| 55 | + |
| 56 | +### Getting Started |
| 57 | + |
| 58 | +#### Roadmap |
| 59 | + |
| 60 | +This is a simple script project to automate a painful manual process I dealt with every day at the office. This gets a WordPress git repository on a unix server and Azure DevOps to play nice with one another. |
| 61 | + |
| 62 | +If you see some adjustments to make, by all means suggest them. This needs some clean up and refactoring yet. |
| 63 | + |
| 64 | +#### Emoji's in commits |
| 65 | + |
| 66 | +Emoji guide can be found here on the [gimoji project site](https://gitmoji.carloscuesta.me/). Choose an emoji from the list provided above that fitst the fix or change you are submitting |
| 67 | + |
| 68 | +#### Submitting a pull request |
| 69 | + |
| 70 | +1) Fork the repository [wordpress-ssh-git-ci](https://github.com/devnetkc) |
| 71 | +2) Create a new branch off of [master](https://github.com/devnetkc) |
| 72 | +3) Make your changes |
| 73 | + - Commit messages not as important, but will help you in making your PR |
| 74 | +4) Create a [Pull Request](https://github.com/devnetkc) for your change into [master](https://github.com/devnetkc) |
| 75 | + - First line is `:emoji_name: what this pr does` > 100 characters |
| 76 | + - In the description include all commit messages as changes -- the squash is coming |
| 77 | + |
| 78 | +It is also recommended to keep your pull request down to one specific issue or feature at a time. |
0 commit comments