Skip to content

yukihiko-shinoda/action-deploy-wordpress-plugin

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy WordPress plugin

Test Docker Cloud Automated build Docker Cloud Build Status Docker Image Size (latest semver) Twitter URL

This is deployment action for WordPress Plugin from Git repository to SubVersion on WordPress.org.

requirement

Your WordPress Plugin project can accept that:

  • Tag revision on Git repository before deploy into WordPress.org
  • Tag name of revision on source Git repository to deploy is the same as version number of plugin’s main PHP file on tagged revision of source Git repository

out of scope

  • Deploying old version than latest version
  • Deploying Assets (Even if Git repository includes assets, this project will deploy the revision content as it is under trunk and tags of SubVersion repository on WordPress.org.)

excluding strategy

The process executes rsync from Git working tree to SubVersion working tree with .rsync-filter.

default behavior

rsync will read default .rsync-filter file.

customizing behavior

If .rsync-filter file is exist on the root of Git working tree, rsync will read it. The most primitive how to write it is to list up files and directories you want to exclude. For more details, following contents will be helpful.

Usage

The code example is given first and some key points are explained later.

Ex:

name: Deploy WordPress plugin
on:
  push:
    # 1. Trigger by pushing tag
    tags:
      - '[0-9]+.[0-9]+.[0-9]+'
jobs:
  build:
    name: Deploy WordPress plugin
    # 2. Specify Linux runner
    runs-on: ubuntu-20.04
    steps:
      # 3. Checkout before Use this deployment action
      - name: Checkout
        uses: actions/checkout@v3
      # 4. Use action with environment variable set by secrets
      - name: Deploy
        uses: yukihiko-shinoda/action-deploy-wordpress-plugin@v2
        env:
          SVN_REPOSITORY_URL: ${{ secrets.SvnRepositoryUrl }}
          SVN_USER_NAME: ${{ secrets.SvnUserName }}
          SVN_USER_PASSWORD: ${{ secrets.SvnUserPassword }}

key point

1. Trigger by pushing tag

If you prefer, you can use filter pattern.

2. Specify Linux runner

We recommend Linux runner. Windows and Mac also may use this action, however we are not running test on these environment to save testing cost now.

3. Checkout before Use this deployment action

This deployment action assumes that the Git repository has been checked out.

4. Use action with environment variable set by secrets

In this example, environment variables are presented by secrets. At least, you'd better to use secret for SVN_USER_NAME and SVN_USER_PASSWORD.

About

GitHub Action for deploy WordPress plugin into SubVersion repository on WordPress.org.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •