Skip to content

Commit

Permalink
Add custom deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
twoelevenjay committed Oct 20, 2024
1 parent 8fec7ef commit 7d61be0
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to WordPress SVN
on:
push:
tags:
- 'v*.*.*' # Trigger deployment when a new tag is pushed.
- 'v*.*.*'

jobs:
deploy:
Expand All @@ -12,14 +12,17 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: WordPress Plugin Deploy
uses: 10up/[email protected]
with:
svn-url: https://plugins.svn.wordpress.org/cmb2-admin-extension/
plugin-slug: cmb2-admin-extension
svn-username: ${{ secrets.WORDPRESS_USERNAME }}
svn-password: ${{ secrets.WORDPRESS_PASSWORD }}
generate-zip: true
- name: Install Subversion
run: sudo apt-get install subversion

- name: Deploy to WordPress SVN
env:
SVN_USERNAME: ${{ secrets.WORDPRESS_USERNAME }}
SVN_PASSWORD: ${{ secrets.WORDPRESS_PASSWORD }}
run: |
svn co https://plugins.svn.wordpress.org/cmb2-admin-extension/ svn-dir
rsync -av --delete --exclude=".git" ./ svn-dir/trunk/
cd svn-dir
svn add --force trunk/*
svn commit -m "Deploying version ${{ github.ref }}" --username $SVN_USERNAME --password $SVN_PASSWORD --non-interactive

0 comments on commit 7d61be0

Please sign in to comment.