build: fix font path #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate README | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
generate-readme: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Google Fonts | |
run: | | |
wget -O Ubuntu.zip https://assets.ubuntu.com/v1/0cef8205-ubuntu-font-family-0.83.zip | |
unzip -d ubuntu/ Ubuntu.zip | |
mv ubuntu /usr/share/fonts | |
fc-cache -fv | |
fc-list | grep Ubuntu | |
rm -r Ubuntu.zip | |
- name: Set up ImageMagick | |
run: | | |
sudo apt-get install -y imagemagick | |
shell: bash | |
- name: Generate Previews | |
run: bash .github/workflows/generate-gallery.sh | |
- name: Build | |
run: python .github/workflows/generate-readme.py | |
- name: Commit | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
COMMIT_MSG: | | |
docs(README): Generated readme | |
run: | | |
git config user.email "actions@github" | |
git config user.name "Github Actions" | |
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
git add . | |
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF}) |