2023-09-27 10:48:32 +02:00
|
|
|
name: Update gitignore and gh-pages
|
2022-10-18 18:37:02 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
paths:
|
|
|
|
- bin/scripts/lib/fonts.json
|
2022-10-18 20:47:29 +02:00
|
|
|
workflow_dispatch:
|
2022-10-18 18:37:02 +02:00
|
|
|
|
|
|
|
jobs:
|
2023-09-27 10:48:32 +02:00
|
|
|
sync_pages:
|
2022-10-18 18:37:02 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-29 17:34:22 +01:00
|
|
|
- name: Fetch gh-pages
|
2024-02-29 11:33:37 +01:00
|
|
|
uses: actions/checkout@v4
|
2022-10-18 18:37:02 +02:00
|
|
|
with:
|
2024-02-29 17:34:22 +01:00
|
|
|
ref: gh-pages
|
2022-10-18 18:57:03 +02:00
|
|
|
|
2024-02-29 17:34:22 +01:00
|
|
|
- name: Fetch files
|
2024-02-29 11:33:37 +01:00
|
|
|
uses: actions/checkout@v4
|
2022-10-18 18:57:03 +02:00
|
|
|
with:
|
2024-02-29 17:34:22 +01:00
|
|
|
sparse-checkout: bin/scripts/lib
|
|
|
|
path: master
|
2022-10-18 18:57:03 +02:00
|
|
|
|
2024-02-29 17:34:22 +01:00
|
|
|
- name: Prepare file
|
2022-10-18 20:47:29 +02:00
|
|
|
run: |
|
|
|
|
mkdir temp_data
|
2024-02-29 17:34:22 +01:00
|
|
|
cp master/bin/scripts/lib/fonts.json temp_data
|
|
|
|
ls -l temp_data
|
2022-10-18 20:47:29 +02:00
|
|
|
|
2022-10-18 18:37:02 +02:00
|
|
|
- name: Deploy to gh-pages
|
|
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
|
|
with:
|
2022-10-18 20:47:29 +02:00
|
|
|
folder: temp_data
|
|
|
|
target-folder: _data
|
2022-10-18 18:37:02 +02:00
|
|
|
commit-message: "[ci] Sync fonts.json"
|
|
|
|
git-config-name: GitHub Actions
|
|
|
|
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
clean: false
|
2023-09-27 10:48:32 +02:00
|
|
|
|
|
|
|
update_gitignore:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-29 11:33:37 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-27 10:48:32 +02:00
|
|
|
|
|
|
|
- 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
|