-
Notifications
You must be signed in to change notification settings - Fork 1
24 lines (22 loc) · 1.03 KB
/
deploy-wp-assets.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: Deploy WordPress Assets
on:
workflow_dispatch:
jobs:
deploy-wp-assets:
if: ( github.actor == 'KingYes' || github.actor == 'arielk' || github.actor == 'bainternet' ) && startsWith( github.repository, 'elementor/' )
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Preparing envs
run: |
svn co https://plugins.svn.wordpress.org/hello-plus/assets remote-wp-assets
rm -rf remote-wp-assets/*
rsync -ah --progress .wporg-assets/* remote-wp-assets/
- name: Publish to WordPress.org SVN
run: |
cd remote-wp-assets
svn status | grep -v '^.[ \t]*\\..*' | { grep '^!' || true; } | awk '{print $2}' | xargs -r svn delete;
svn status | grep -v '^.[ \t]*\\..*' | { grep '^?' || true; } | awk '{print $2}' | xargs -r svn add;
svn status
svn ci -m "Assets updated" --no-auth-cache --non-interactive --username "${{ secrets.SVN_USERNAME }}" --password "${{ secrets.SVN_PASSWORD }}"