userPFP/.github/workflows/generate-db.yml
nexpid 5a5d2c2a2b
refactor: massive USRPFP overhaul (#3)
This repo completely overhauls how USRPFP works. Some changes include:
- Deleted some leftover files
- Edited README.md a bit
- Avatars and badges are now stored in `db/data.json`
- CSS file (`db/dist.css`) is automatically generated by a GitHub
workflow

If you have questions, lmk
2023-08-29 11:12:01 +01:00

52 lines
1.1 KiB
YAML

name: Generate Database
on:
push:
branches:
- main
paths:
- ".github/workflows/generate-db.yml"
- ".github/scripts/generate/**/*.*"
- "db/data.json"
- "db/template.css"
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Setup PNPM
working-directory: .github/scripts
run: |
npm i -g pnpm
pnpm i
- name: Run generate script
working-directory: .github/scripts
run: pnpm run generate
- name: Push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add db/dist.css
git commit -m "chore(db): update dist.css (${{ github.sha || 'manual trigger' }})" || true
git push