Repository navigation
feat: Allow arbitrary values + README overhaul #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync README code blocks | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - package/src/** | |
| - package/scripts/generate-squircle-css.ts | |
| - package/vite.config.ts | |
| - scripts/sync-readme.sh | |
| - vite.config.ts | |
| - README.md | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version: "22" | |
| cache: true | |
| - run: vp install | |
| - name: Run sync script | |
| run: vp run sync-readme | |
| - name: Commit and push if changed | |
| run: | | |
| git diff --quiet README.md && exit 0 | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add README.md | |
| git commit -m "docs: sync README code blocks [skip ci]" | |
| git push || { | |
| echo "::error::README is out of sync and could not push fix to branch" | |
| exit 1 | |
| } |