From 7d79a489eb4d65afb7936de1d754b2e4994953ba Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Fri, 27 Jan 2023 15:34:25 +0100 Subject: [PATCH] CI: Create CI for contributors update [why] It's a pain to have the addition of contributors automated via all-contributors bot, but then it does not end up on the webpage. [how] I'm not sure it will automatically be triggered (pretty sure it will not), but at least one can clickstart manually the workflow. Signed-off-by: Fini Jastrow --- .github/workflows/contributors.yml | 40 ++++++++++++++++++++++++++++++ bin/scripts/README.md | 3 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/contributors.yml diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml new file mode 100644 index 000000000..029e19611 --- /dev/null +++ b/.github/workflows/contributors.yml @@ -0,0 +1,40 @@ +name: Update contributors + +on: + push: + branches: [ master ] + paths: + - CONTRIBUTORS.md + - bin/scripts/update-all-contributors-website.py + + workflow_dispatch: + +jobs: + create-casks: + name: Update gh-pages contributors + runs-on: ubuntu-latest + steps: + - name: Fetch from master + uses: Bhacaz/checkout-files@v2 + with: + files: CONTRIBUTORS.md bin/scripts/update-all-contributors-website.py + branch: master + - name: Fetch from gh-pages + uses: Bhacaz/checkout-files@v2 + with: + files: _posts/2017-01-05-all-contributors.md + branch: gh-pages + - name: Update the page + run: | + cd bin/scripts + chmod u+x * + ./update-all-contributors-website.py + - 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 diff --git a/bin/scripts/README.md b/bin/scripts/README.md index 7fa81f6ad..1dd1a4ecf 100644 --- a/bin/scripts/README.md +++ b/bin/scripts/README.md @@ -27,7 +27,7 @@ Note: Usually you need to call the scripts in this directory while actually bein * `test-fonts.sh`: Print-to-debug all glyphs we patch in [4] * `test-powerlines.sh`: Print-to-debug powerline examples [4] * `tests.sh`: Create some font usage gif movie? [x] -* `update-all-contributors-website.py`: Update the contributors page on `nerdfonts.com` (i.e. gh-pages) (Hardcoded paths!) [3] +* `update-all-contributors-website.py`: Update the contributors page on `nerdfonts.com` (i.e. gh-pages) [7] * `version-bump.sh`: Change version number in all scripts on a new release [1] [1] Used by CI (github release workflow) @@ -36,4 +36,5 @@ Note: Usually you need to call the scripts in this directory while actually bein [4] To be used manually [5] Used by CI (github packsvgs workflow) [6] Used by CI (github casks workflow) +[7] Used by CI (github contributors workflow) [x] Probably not used by anything