nerd-fonts/.github/workflows/fontjson.yml
Fini Jastrow 48156a785f CI: Update all actions
[why]
Because we want to use Node 20 etc pp

[how]
Check for breaking changes and update.

Also replace checkout-files by checkout with sparse-checkout; as they
semselves encourage people to do.

action-gh-release has been updated to Node 20 but has not been released
with the change, so we access the latest version directly by hash.

[note]
Of course this is unchecked... what can ge wrong! 😬

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2024-02-29 11:36:41 +01:00

63 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: actions/checkout@v4
with:
sparse-checkout: bin/scripts/lib
- 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@v4
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@v4
- 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