Skip to content

Download Noto fonts #19

Download Noto fonts

Download Noto fonts #19

name: Download Noto fonts
on:
workflow_dispatch:
jobs:
clone_and_commit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Clone noto fonts repository
run: |
git clone --depth 1 https://github.com/notofonts/notofonts.github.io.git
- name: Recreate noto fonts directory
run: |
rm -rf noto
mkdir noto
- name: Copy license file and unhinted fonts
run: |
cp notofonts.github.io/fonts/LICENSE noto/
cp notofonts.github.io/fonts/*/unhinted/ttf/*.ttf noto/
rm -rf notofonts.github.io
- name: Clone noto-cjk fonts repository
run: |
git clone --depth 1 https://github.com/notofonts/noto-cjk.git
- name: Copy license file and noto-cjk variable TTF fonts
run: |
cp noto-cjk/Serif/LICENSE noto/LICENSE-noto-cjk-serif
cp noto-cjk/Serif/Variable/TTF/*.ttf noto/
cp noto-cjk/Serif/Variable/TTF/Subset/*.ttf noto/
cp noto-cjk/Sans/LICENSE noto/LICENSE-noto-cjk-sans
cp noto-cjk/Sans/Variable/TTF/*.ttf noto/
cp noto-cjk/Sans/Variable/TTF/Subset/*.ttf noto/
rm -rf noto-cjk
- name: Clone noto-emoji fonts repository
run: |
wget https://github.com/google/fonts/raw/main/ofl/notoemoji/NotoEmoji%5Bwght%5D.ttf
wget https://github.com/google/fonts/raw/main/ofl/notoemoji/OFL.txt
- name: Copy license file and noto-emoji TTF fonts
run: |
mv NotoEmoji*.ttf noto/
mv OFL.txt noto/LICENSE-noto-emoji
- name: Check for changes
id: git-check
run: |
git add noto
if [[ -n "$(git status --porcelain)" ]]; then
echo "HAS_CHANGES=true" >> $GITHUB_ENV
fi
- name: Commit changes
if: env.HAS_CHANGES == 'true'
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git commit -m "chore: Update noto fonts"
git push