-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.3 KB
/
generate-readme.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
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://fonts.google.com/download?family=Ubuntu
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})