nerd-fonts/.github/workflows/contributors.yml
Fini Jastrow b64ee780f6 CI: Fixup: contributors workflow
[why]
After changing from checkout-files to checkout we can not have two
branches in one place.

[how]
Check the branches out in different directories and merge the needed
files afterwards.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2024-02-29 17:28:20 +01:00

49 lines
1.3 KiB
YAML

name: Update contributors
on:
push:
branches: [ master ]
paths:
- CONTRIBUTORS.md
- bin/scripts/update-all-contributors-website.py
workflow_dispatch:
jobs:
do_update:
name: Update gh-pages contributors
runs-on: ubuntu-latest
steps:
- name: Get details and script from default branch
uses: actions/checkout@v4
with:
sparse-checkout: |
.
bin/scripts
path: master
- name: Fetch old from gh-pages
uses: actions/checkout@v4
with:
sparse-checkout: _posts
ref: gh-pages
- name: Combine branches
run: |
cp master/CONTRIBUTORS.md .
mkdir -p bin/scripts
mv master/bin/scripts bin/scripts
- name: Update the page
run: |
cd bin/scripts
chmod u+x *
ls -l ../../_posts
./update-all-contributors-website.py
ls -l ../../_posts
- name: Deploy page to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _posts
target-folder: _posts
commit-message: "[ci] Regenerate contributors"
git-config-name: GitHub Actions
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
clean: false