Skip to content

Commit

Permalink
Update push-to-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yssambare12 authored Jan 21, 2025
1 parent fb59fc3 commit 8458689
Showing 1 changed file with 16 additions and 37 deletions.
53 changes: 16 additions & 37 deletions .github/workflows/push-to-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,25 @@
name: Deploy to SVN on Tag

name: Deploy to WordPress.org
on:
push:
tags:
- '*'

- "*"
jobs:
deploy:
tag:
name: New tag
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup SVN credentials
run: |
echo "::add-mask::$SVN_USERNAME"
echo "::add-mask::$SVN_PASSWORD"
- name: Checkout SVN repository
run: |
svn checkout --depth=immediates https://plugins.svn.wordpress.org/custom-fonts svn-custom-fonts
cd svn-custom-fonts
svn update trunk tags
- uses: actions/checkout@master

- name: Copy files to SVN trunk
run: |
rsync -av --delete --exclude=".git" --exclude=".github" --exclude=".gitignore" --exclude="node_modules" \
--exclude="tests" --exclude="README.md" --exclude="package-lock.json" --exclude="package.json" ./ ./svn-custom-fonts/trunk/
- name: Use Node.js 14.x
uses: actions/setup-node@v3
with:
node-version: 14.x

- name: Add new tag in SVN
env:
VERSION: ${{ github.ref_name }}
run: |
cd svn-custom-fonts
svn copy trunk tags/$VERSION
svn update tags/$VERSION
- name: Build Assets
run: npm install && npm run build-package

- name: Commit changes to SVN
run: |
cd svn-custom-fonts
svn add --force .
svn commit --username ${{ secrets.SVN_USERNAME }} --password ${{ secrets.SVN_PASSWORD }} -m "Deploying version ${{ github.ref_name }}"
- name: WordPress Plugin Deploy
uses: Nikschavan/action-wordpress-plugin-deploy@develop
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}

0 comments on commit 8458689

Please sign in to comment.