-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (33 loc) · 1.21 KB
/
sync-theme.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
on:
schedule:
- cron: '0 6 * * 0' # Run once per week at 6am UTC on Sundays.
name: sync-theme
jobs:
sync-theme:
name: sync theme
runs-on: ubuntu-latest
steps:
- name: Copy Latest Theme
shell: bash
env:
TOKEN: ${{ secrets.PERSONAL_TOKEN }}
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
echo "Cloning create-mantle-app..."
git clone --depth=1 https://[email protected]/alleyinteractive/create-mantle-app.git create-mantle-app
echo "Cloning theme..."
git clone --depth=1 https://github.com/WordPress/WordPress.git wordpress
echo "Removing old theme..."
rm -rf create-mantle-app/themes/twentytwentyone
echo "Replacing theme..."
mv wordpress/wp-content/themes/twentytwentyone create-mantle-app/themes/twentytwentyone
cd create-mantle-app/themes
if [ -z "$(git status --porcelain)" ]; then
echo "No changes"
else
echo "Committing..."
git add -A
git commit -m "Syncing twentytwentyone"
git push
fi