nerd-fonts/.github/workflows/fontjson.yml
Fini Jastrow 090fbbeebe Sunset in-repo releases
[why]
We struggle with the pack-committing of patched fonts to the repository
on release. This makes our repo grow extremely big. It would be better
to just use release artifacts for the releases and not commit any
patched font back.
There were different approaches discussed, but the problem remains that
I personally have no rights to implement anything of that - neither can
I force push to the default branch, nor can I create new repos in the
organization.

[how]
To make it still possible to add new fonts without a repo size
explosion we do not release NEW fonts back to the repository as commits,
but old fonts are handled as before.
NEW fonts:
 * have a new property set in the fonts.yaml 'database'
 * are released as release artifact via release workflow (but not
   committed back)
 * get a readme in the patched_fonts/ directory that points to the
   release artifact page

The solution is not ideal, but for sure better than not adding any fonts
anymore or having the repo grow in size faster and faster.

At some point in time I would like to phase out all in-repo releases,
also for OLD fonts.

This scheme has been (manually) used / introduced for Intel One.
With this change the .gitignore file is automatically adapted to any new
font that is added with the repoRelease flag set to false (which should
be the default for any added font from now on).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-09-27 11:20:36 +02:00

64 lines
1.6 KiB
YAML

name: Update gitignore and gh-pages
on:
push:
branches: [ master ]
paths:
- bin/scripts/lib/fonts.json
workflow_dispatch:
jobs:
sync_pages:
runs-on: ubuntu-latest
steps:
- name: Fetch files
uses: Bhacaz/checkout-files@v2
with:
files: bin/scripts/lib/fonts.json
branch: ${{ github.sha }}
- name: Prepare file
run: |
echo "Temp dir is /tmp"
cp bin/scripts/lib/fonts.json /tmp
ls -l /tmp/fonts.json
- name: Fetch gh-pages
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Prepare file 2
run: |
ls -l /tmp/fonts.json
mkdir temp_data
cp /tmp/fonts.json temp_data
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: temp_data
target-folder: _data
commit-message: "[ci] Sync fonts.json"
git-config-name: GitHub Actions
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
clean: false
update_gitignore:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Regenerate gitignore
run: |
cd bin/scripts
./update-gitignore.sh
- name: Commit gitignore back to repo
uses: EndBug/add-and-commit@v9
with:
fetch: false
add: ".gitignore"
message: "[ci] Update .gitignore file"
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com