name: Caterium One-Time Branding Repair on: push: branches: ["fix/caterium-branding-v1774"] permissions: contents: write concurrency: group: caterium-branding-repair-v1774 cancel-in-progress: false jobs: repair: if: ${{ !contains(github.event.head_commit.message, '[branding-repair]') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: fix/caterium-branding-v1774 fetch-depth: 0 - name: Replace visible legacy branding shell: bash run: | node <<'NODE' const fs=require('fs'); const path='public/index.html'; let src=fs.readFileSync(path,'utf8'); const replacements=[ ['Солнце Кейтеринг','Caterium'], ['',''], ['
Солнце Кейтеринг
','
Caterium
'] ]; for(const [from,to] of replacements){ const count=src.split(from).length-1; if(count!==1) throw new Error(`Expected exactly one occurrence: ${from}; found ${count}`); src=src.replace(from,to); } fs.writeFileSync(path,src); NODE - name: Commit branding repair shell: bash run: | set -euo pipefail git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add public/index.html git commit -m "brand: replace visible legacy name [branding-repair]" git push origin HEAD:fix/caterium-branding-v1774