@@ -29,8 +29,11 @@ were added. Your job is to apply useful upstream improvements without breaking a
2929
3030## Step 1: Check for new template changes
3131
32- Read the file ` .github/template-sync-state.json ` . It contains ` lastSyncedCommit ` — the last
33- template commit SHA that was already processed.
32+ Read the file ` .github/template-sync-state.json ` from the repository. It contains
33+ ` lastSyncedCommit ` — the last template commit SHA that was already processed.
34+
35+ ** Important** : If the file does not exist, use the initial baseline SHA
36+ ` d548b61351af9ef0802da1946d26b2c35a3db449 ` as the starting point and create the state file.
3437
3538Use the GitHub repos tool to get the latest commit SHA on the ` main ` branch of
3639` nuxt-ui-templates/saas ` .
@@ -137,66 +140,23 @@ corepack enable 2>/dev/null || npm install -g pnpm
137140pnpm install
138141```
139142
140- Run type checking and linting:
141-
142- ``` bash
143- pnpm run typecheck
144- pnpm run lint
145- ```
146-
147- ## Step 6: Run the dev server and take screenshots
148-
149- Install ` @playwright/cli ` (the Playwright CLI tool designed for coding agents), then start the
150- dev server and take screenshots of key pages. Save them to ` .playwright-screenshots/ ` (this
151- folder is not committed to git — it will be uploaded as a workflow artifact separately).
143+ If ` pnpm install ` fails due to native module compilation (e.g. ` better-sqlite3 ` ), try:
152144
153145``` bash
154- npm install -g @playwright/cli@latest
146+ pnpm install --ignore-scripts
147+ # Then rebuild only the needed native module
148+ cd node_modules/.pnpm/better-sqlite3@* /node_modules/better-sqlite3 && npx --yes prebuild-install || npx --yes node-gyp rebuild
149+ cd -
155150```
156151
157- Start the dev server in background and wait for it to be ready:
158-
159- ``` bash
160- # Start dev server in background
161- pnpm dev &
162- DEV_PID=$!
163-
164- # Wait up to 90 seconds for the dev server to be ready
165- for i in $( seq 1 30) ; do
166- curl -sf http://localhost:3000 > /dev/null && echo " Dev server ready" && break
167- echo " Waiting for dev server... ($i /30)"
168- sleep 3
169- done
170- ```
171-
172- Create the screenshots directory and take screenshots with ` playwright-cli ` :
152+ Run type checking and linting:
173153
174154``` bash
175- mkdir -p .playwright-screenshots
176-
177- playwright-cli open http://localhost:3000
178- playwright-cli screenshot --filename=.playwright-screenshots/home.png
179-
180- playwright-cli goto http://localhost:3000/posts
181- playwright-cli screenshot --filename=.playwright-screenshots/posts.png
182-
183- playwright-cli goto http://localhost:3000/goodies
184- playwright-cli screenshot --filename=.playwright-screenshots/goodies.png
185-
186- playwright-cli goto http://localhost:3000/speaking
187- playwright-cli screenshot --filename=.playwright-screenshots/speaking.png
188-
189- playwright-cli goto http://localhost:3000/tags
190- playwright-cli screenshot --filename=.playwright-screenshots/tags.png
191-
192- playwright-cli goto http://localhost:3000/about
193- playwright-cli screenshot --filename=.playwright-screenshots/about.png
194-
195- playwright-cli close
196- kill $DEV_PID 2> /dev/null || true
155+ pnpm run typecheck
156+ pnpm run lint
197157```
198158
199- ## Step 7 : Create pull request
159+ ## Step 6 : Create pull request
200160
201161Create a pull request with:
202162
@@ -210,6 +170,4 @@ Create a pull request with:
210170 - A table listing each changed file and the action taken (Applied / Adapted / Improved /
211171 Skipped) with a brief reason for skipped files
212172 - Any errors encountered during typecheck or lint, and whether they were fixed
213- - A note that screenshots of key pages are available as a ** workflow artifact** on the
214- Actions run (link to the run URL) — they expire after 30 days
215173 - A reminder to review ` package.json ` dependency changes carefully before merging
0 commit comments