-
-
Notifications
You must be signed in to change notification settings - Fork 57
56 lines (53 loc) · 1.58 KB
/
update-content.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Update changes on commit
on:
workflow_dispatch:
push:
branches: [master]
paths:
- "assets/**"
- "customize/**"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 📂 Create temp folder
run: |
mkdir temp
- name: 🖼️ Add backgrounds
run: |
for file in assets/backgrounds/*.png ; do
filename=$(basename "$file" .png)
mkdir "temp/$filename"
cp "$file" "temp/$filename/background.png"
done
- name: 🎨 Add icons
run: |
for dest in temp/* ; do cp -rv assets/icons "$dest"; done
- name: 📇 Add fonts
run: |
for dest in temp/* ; do cp -rva assets/fonts/. "$dest"; done
- name: 🌿 Add menu
run: |
for dest in temp/* ; do cp -rva assets/menu/. "$dest"; done
- name: 📃 Add theme
run: |
for dest in temp/* ; do cp -rv assets/theme.txt "$dest"; done
- name: 🗑️ Cleanup old themes
run: |
rm -rf themes/*
- name: 💼 Create archives
run: |
cd temp;
for dest in * ; do find "$dest" -printf "%P\n" | tar -vcf ../themes/"$dest".tar --no-recursion -C "$dest" -T -; done
- name: Remove artifacts
run: |
rm -r temp
- name: 🔥 Commit changes
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch
git add .
git commit -m "🤖 Update files"
git push