Develop and Deploy Outside the Repo

21
Develop & Deploy Outside the Repo Directory

Transcript of Develop and Deploy Outside the Repo

Page 1: Develop and Deploy Outside the Repo

Develop & Deploy Outside the Repo Directory

Page 2: Develop and Deploy Outside the Repo

What's the Goal?

Develop in local development environment

Push code to git server

Update your code seamlessly in WordPress

Page 3: Develop and Deploy Outside the Repo

Everyone Should Use Version Control

GitHub

Bitbucket

GitLab

Other git server

Page 4: Develop and Deploy Outside the Repo

Semantic Versioning

Everyone should tag your releases using semantic versioning

https://semver.org

Page 5: Develop and Deploy Outside the Repo

MAJOR.MINOR.PATCH

MAJOR - incompatible API changes, something that definitely breaks backwards compatibility

MINOR - add functionality, maintaining backwards compatibility

PATCH - bug fixes, maintaining backwards compatibility

Page 6: Develop and Deploy Outside the Repo

MAJOR.MINOR.PATCH.DEV

DEV - increase version number during in the develop branch

Page 7: Develop and Deploy Outside the Repo

Develop in your local environment

Push commits

Tag releases

Page 8: Develop and Deploy Outside the Repo

Now What?

Page 9: Develop and Deploy Outside the Repo

How to Deploy Your Code

FTP/SFTP

Add updater library to every project

Use an updater plugin

Continuous Integration

Page 10: Develop and Deploy Outside the Repo

FTP/SFTP

Upload changed files or complete project everywhere

Doesn't scale well

Dependent upon remembering where all your deployments are located

Page 11: Develop and Deploy Outside the Repo

Updater Library

WordPress-GitHub-Plugin-Updater

https://github.com/radishconcepts/WordPress-GitHub-Plugin-Updater

Requires additional code in every project

Difficult to update the updater code

Page 12: Develop and Deploy Outside the Repo

Updater Plugin

Updater code outside of your projects

Easy to maintain updater plugin

Examples

GitHub Updater

WP Pusher

Page 13: Develop and Deploy Outside the Repo
Page 14: Develop and Deploy Outside the Repo

Demo

Page 15: Develop and Deploy Outside the Repo

Continuous Integration

Use of RESTful endpoint to automatically update your code on every push/commit

Webhooks

Page 16: Develop and Deploy Outside the Repo
Page 17: Develop and Deploy Outside the Repo

Demo

Page 18: Develop and Deploy Outside the Repo

Questions?

Page 19: Develop and Deploy Outside the Repo

WhoAmI?

Acute Care Surgeon in Palm Springs, CA

Twitter: @andyfragen

GitHub: https://github.com/afragen

Occasional blogger: https://thefragens.com

WordCamp Sponsor/Speaker

Developer of GitHub Updater

Page 20: Develop and Deploy Outside the Repo
Page 21: Develop and Deploy Outside the Repo

What's Next!

GitHub Languages: https://github.com/afragen/github-updater-translations

Decoupled language pack updates for your plugins/themes.