Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: voidzero-dev/setup-vp@v1
with:
node-version: "22"
node-version-file: ".node-version"
cache: true

- run: vp install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: voidzero-dev/setup-vp@v1
with:
node-version: "22"
node-version-file: ".node-version"
cache: true

- run: vp install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: voidzero-dev/setup-vp@v1
with:
node-version: "22"
node-version-file: ".node-version"
cache: true

- run: vp install
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/sync-stylex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Sync generated stylex.ts

on:
pull_request:
branches: [main]
paths:
- package/src/stylex.template.ts
- package/src/stylex.ts
- package/src/variants.ts
- package/scripts/generate-stylex.ts
workflow_dispatch:

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-file: ".node-version"
cache: true

- run: vp install

- name: Regenerate package/src/stylex.ts
run: vp run @klinking/squircle#generate:stylex

- name: Commit and push if changed
run: |
git diff --quiet package/src/stylex.ts && exit 0
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add package/src/stylex.ts
git commit -m "chore: regenerate package/src/stylex.ts"
git push || {
echo "::error::package/src/stylex.ts is out of sync and could not push fix to branch"
exit 1
}
Loading
Loading