Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
farhadsakhaei authored Mar 17, 2024
0 parents commit 6b630c3
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Sync With WordPress SVN

on:
#push:
# branches:
# - main
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '00 12 * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Configure Git
run: |
git config --global user.name 'Farhad Sakhaei'
git config --global user.email 'farhad0@gmail.com'
- name: Configure Git
run: |
git checkout main
- name: Remove unwanted files
run: |
find . -mindepth 1 -maxdepth 1 ! -name '.github' ! -name '.git' -exec rm -rf {} +
- name: Get plugin from SVN
run: |
svn checkout https://plugins.svn.wordpress.org/smart-seo/trunk .
rm -rf ".svn"
- name: Commit and push changes
run: |
git add .
git commit -am "Sync plugin from SVN"
git push origin main

0 comments on commit 6b630c3

Please sign in to comment.