chore: Extract emoji fetch to script

This commit is contained in:
overflowerror 2024-08-07 22:46:01 +02:00
parent 9d78509d04
commit 234e7d50aa
2 changed files with 12 additions and 6 deletions

View file

@ -30,12 +30,7 @@ jobs:
cd resources/js
npm run build
- name: Fetch Emoji
run: |
git clone -b gh-pages --depth=1 https://github.com/twitter/twemoji/
grep ".png" ./html/styles/emoji.css | sed -E 's/.*\/([^/]+)\..*/\1/g' | while read f; do
cp "./twemoji/36x36/$f.png" "./html/images/emoji/"
done
rm -rf twemoji
run: ./bin/setup/fetch-emoji.sh
- name: Deploy
env:
FTP_SERVER: ${{ secrets.FTP_SERVER }}

11
bin/setup/fetch-emoji.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
cd "$(dirname "$(dirname "$(dirname "$0")")")"
git clone -b gh-pages --depth=1 https://github.com/twitter/twemoji/
grep ".png" ./html/styles/emoji.css | sed -E 's/.*\/([^/]+)\..*/\1/g' | while read f; do
cp -v "./twemoji/36x36/$f.png" "./html/images/emoji/"
done
rm -rf twemoji