Ahmad Awais

NAVIGATE


SHARE


Introducing Continuous Deployment for WordPress Plugins with GitHub Actions

Ahmad AwaisAhmad Awais

We live in the age of agile workflows. Git is preferred over FTP. Especially with the advent of JAMstack and services like AWS Amplify and Netlify; developers only want to git commit && git push and expect their products to be deployed globally.

It’s been a minute since I worked on a WordPress project, but for the last year or so, I’ve been fantasizing about a git-based plugin deployments workflow that will allow me to get away from those old SVN repositories finally.

I see dealing with SVN as a DevOps task. Something web developers should not be concerned with, in 2020. Web developers want to build websites. They want to use Git to do that. With JAMstack, everyone has become accustomed to the idea of pushing a git commit and getting the new build/release. That’s why I built WP Continuous Deployment.

🚀 WP Continuous Deployment#

Use wp-continuous-deployment to set up an instant GitHub to WordPress.org SVN deployment pipeline with incredibly powerful GitHub Actions. A true commit-deploy workflow with complex dev-ops done for you.

So, here it is. I just built one. wp-continuous-deployment is a Node.js based CLI script. It automates everything you need to set up an instant, continuous deployment pipeline with GitHub Actions; for your WordPress plugins.

🌟 Star WP Console Deployment on GitHub & follow Awais to get updates

📟

Install

npx wp-continuous-deployment

⚙️

Usage

❯ BEFORE#

  1. Make sure your plugin is hosted on WordPress.org
  2. Put your WordPress plugin’s code in a GitHub Repo
  3. Clone the GitHub repo in your PC and browse it with command line
  4. Run npx wp-console-deployment in root of the repo, you cloned
npx wp-continuous-deployment

❯ ONE-TIME SETUP#

  • Follow the instructions, set the slug of your plugin which is the last part of the URL, e.g., for my plugin wordpress.org/plugins/cf7-customizer/ the slug is cf7-customizer
  • Add you WordPress.org SVN username/password (it’s the same credentials you use for login.WordPress.org) in your plugin’s GitHub repository settings.
  • Go to https://github.com/owner/repo/settings/secrets make sure to change the owner/repo part.
  1. Click Add New Secret add
    NAME SVN_USERNAME and fill the value with your username
  2. Click Add New Secret again; add
    Name SVN_PASSWORD and fill the value with your password
WP Console Deployment

❯ AFTER#

  1. All your plugin assets must have been downloaded in the .wordpress-org directory automatically
  2. Or go to https://ps.w.org/plugin-slug/ and then assets directory (if it exists) to manually download the assets and place them .wordpress-org directory (commit it to the GitHub repo)

What’s next?#

🌟 Star WP Console Deployment on GitHub & follow Awais to get updates
  • For every commit/push to master your assets & readme will get deployed (provided there are no other files were modified. If other files are changed the build will be canceled)
  • For every new tag/push, a new version of the plugin will be deployed to the WordPress.org SVN repository.
  • So, go ahead, make changes, git commit, and then run: git tag 2.0.0 && git push --tags — considering 2.0.0 is the new version

📝

Changelog

❯ Read the changelog here →

KEY: 📦 NEW, 👌 IMPROVE, 🐛 FIX, 📖 DOC, 🚀 RELEASE, and ✅ TEST

I use Emoji-log, you should try it and simplify your git commits.

📃

License & Conduct

🌟 Star WP Console Deployment on GitHub & follow Awais to get updates

Founder & CEO at Langbase.com — The Composable AI Developer platform · Serverless AI Cloud · Ship agentic AI pipes, tools, and memory with BaseAI — The first Web AI Framework (free, open-source, local-first, deploys serverless, agentic pipes, tools, and memory)

Ex VP DevTools & DevRel Eng. Rapid · Google Developers Advisory Board (gDAB) founding member. 🧑‍💻 AI/ML/DevTools Angel InvestorAI/ML Advisory Board San Francisco, DevNetwork

🎩 Award-winning Open Source Engineer & Dev Advocate 🦊 Google Developers Expert Web DevRel 🚀 NASA Mars Ingenuity Helicopter mission code contributor 🏆 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer).

🌳 Node.js foundation Community Committee Outreach Lead, Member Linux Foundation, OpenAPI Business Governing Board, and DigitalOcean Navigator. 📟 Teaching thousands of developers Node.js CLI Automation and VSCode.pro course. Over 142 million views, 24 yrs Blogging, 108K developers learning, 200+ FOSS.

✌️ Author of various open-source dev-tools and software libraries utilized by millions of developers worldwide WordPress Core Developer 📣 TEDx Speaker with 100+ international talks.

As quoted by: Satya Nadella · CEO of Microsoft — Awais is an awesome example for developers.
💜 Loves his wife (Maedah) ❯ Read more about Ahmad Awais.

👋… Awais is mostly active on 𝕏 @MrAhmadAwais

📨

Developers Takeaway

Stay ahead in the web dev community with Ahmad's expert insights on open-source, developer relations, dev-tools, and side-hustles. Insider-email-only-content. Don't miss out - subscirbe for a dose of professional advice and a dash of humor. No spam, pinky-promise!

✨ 172,438 Developers Already Subscribed
Comments 0
There are currently no comments.