Deploy ParkourLabs.com
Deploy ParkourLabs onto Production Server through Github Action.
1. Table of Contents
- 2.1. Built With
- 2.2. Installation
2. About The Project
This is a deployment workflow that allows me to fully push a WordPress site (including the database) into version control and then deploy the site to the production server.
2.1. Built With
This project was built with the following frameworks, technologies and software.
2.2. Installation
Fork repo.
Note, all secrets and database are git-crypted. The real wp-config.php
file is already on the server and is symlinked during the process.
3. Usage
3.1. Deploying Process
3.1.1. Deployment to Staging Server
To deploy onto the staging server you can push to the master
git branch. This will trigger the necessary steps to fully build the site from the code in this repository.
Use "-nodeploy" in the commit message to not run a deploy and just commit to repo.
3.1.2. Updating this repository with the vagrant version
If you wish to update this repository with the copy on vagrant, use the command;
gitdeploy
This is a bash script in the script-library repository (https://github.com/IORoot/script-library/tree/master/deploy) that will do the following steps:
- SSH into the specified vagrant machine (default dev.londonparkour.com) and run
dumpdb
in the vhost directory. - Move the dump file into this repo's
/wp-content/database/
folder so you have a copy of the latest vagrant DB. - Recursively update all git submodules in this repo to get all latest copies of themes and plugins.
- Git add all.
- Git commit to
master
unless otherwise specified. - Git push to github.
The gitdeploy
command also takes a single argument to push to another branch.
3.1.3. Deployment to LIVE
To deploy to the live server, you need to first add a release to this repository.
github > Releases > Draft a new Release
Then manually run the action.
github > Actions > [LIVE] Create a release > Run Workflow
4. Customising
None.
5. Troubleshooting
None.
6. Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue. Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
7. License
Distributed under the MIT License.
MIT License
Copyright (c) 2022 Andy Pearson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8. Contact
Author Link: https://github.com/IORoot
9. Changelog
v1.0.1 - Fixed GUID issue with the tree shortcode plugin. Also added gitdeploy.sh command.
v1.0.0 - Setup repo and initial release of LABS V2.0.0