Skip to content

Commit f933367

Browse files
committed
chore: updated commands, use plain node
1 parent 3ccf909 commit f933367

32 files changed

+151
-167
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
push:
1111
branches:
1212
- main
13-
pull_request_target:
13+
pull_request:
1414
branches:
1515
- main
1616
types:
@@ -30,15 +30,13 @@ permissions:
3030
env:
3131
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
3232
TURBO_ARGS: --cache-dir=.turbo/cache
33-
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--force
34-
TURBO_FORCE: true
3533

3634
jobs:
3735
build:
38-
# This Job should run either on non-`pull_request_target` events,
39-
# or `pull_request_target` event with a `labeled` action with a label named `github_actions:pull-request`
36+
# This Job should run either on non-`pull_request` events,
37+
# or `pull_request` event with a `labeled` action with a label named `github_actions:pull-request`
4038
# since we want to run Website Builds on all these occasions. As this allows us to be certain the that builds are passing
41-
if: github.event_name != 'pull_request_target' || github.event.label.name == 'github_actions:pull-request'
39+
if: github.event_name != 'pull_request' || github.event.label.name == 'github_actions:pull-request'
4240

4341
name: Build on ${{ matrix.os }}
4442
runs-on: ${{ matrix.os }}
@@ -64,7 +62,7 @@ jobs:
6462
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6563
with:
6664
# Provides the Pull Request commit SHA or the GitHub merge group ref
67-
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
65+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
6866
# We only need to fetch the last commit from the head_ref
6967
# since we're not using the `--filter` operation from turborepo
7068
# We don't use the `--filter` as we always want to force builds regardless of having changes or not
@@ -80,8 +78,6 @@ jobs:
8078

8179
- name: Set up pnpm
8280
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
83-
with:
84-
cache: true
8581

8682
- name: Set up Node.js
8783
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
@@ -96,7 +92,7 @@ jobs:
9692

9793
- name: Build Next.js (ISR)
9894
# We want a ISR build on CI to ensure that regular Next.js builds work as expected.
99-
run: pnpm exec turbo build ${{ env.TURBO_ARGS }}
95+
run: node_modules/.bin/turbo build -- ${{ env.TURBO_ARGS }}
10096
env:
10197
# We want to ensure we have enough RAM allocated to the Node.js process
10298
# this should be a last resort in case by any chances the build memory gets too high
@@ -109,7 +105,7 @@ jobs:
109105
# We only run full static builds within Pull Requests. This step is also used to export
110106
# static output in all languages, and it only works on `push` events.
111107
if: github.event_name == 'push'
112-
run: pnpm exec turbo deploy ${{ env.TURBO_ARGS }}
108+
run: node_modules/.bin/turbo deploy -- ${{ env.TURBO_ARGS }}
113109
env:
114110
# We want to ensure we have enough RAM allocated to the Node.js process
115111
# this should be a last resort in case by any chances the build memory gets too high
@@ -126,27 +122,27 @@ jobs:
126122
# in order to reduce source wastages and build times.
127123
# Note that we skip full static builds on Crowdin-based Pull Requests as these PRs should only contain translation changes
128124
if: |
129-
(github.event_name == 'pull_request_target' &&
125+
(github.event_name == 'pull_request' &&
130126
github.event.pull_request.head.ref != 'chore/crowdin')
131-
run: pnpm exec turbo deploy ${{ env.TURBO_ARGS }}
127+
run: node_modules/.bin/turbo deploy -- ${{ env.TURBO_ARGS }}
132128
env:
133129
# We want to ensure we have enough RAM allocated to the Node.js process
134130
# this should be a last resort in case by any chances the build memory gets too high
135131
# but in general this should never happen
136132
NODE_OPTIONS: '--max_old_space_size=4096'
137133
# Used for API requests that require GitHub API scopes
138134
NEXT_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
139-
# We want to ensure that static exports for all locales do not occur on `pull_request_target` events
135+
# We want to ensure that static exports for all locales do not occur on `pull_request` events
140136
NEXT_PUBLIC_STATIC_EXPORT_LOCALE: false
141137

142138
- name: Sync Orama Cloud
143139
# We only want to sync the Orama Cloud production indexes on `push` events.
144-
# We also want to sync the Orama Cloud preview (deployment) indexes on `pull_request_target` events (or manual triggers).
140+
# We also want to sync the Orama Cloud preview (deployment) indexes on `pull_request` events (or manual triggers).
145141
# We also want to ensure that the sync only happens on the `ubuntu-latest` runner to avoid duplicate syncs
146142
# or Windows-based path issues.
147143
env:
148144
ORAMA_INDEX_ID: ${{ github.event_name == 'push' && secrets.ORAMA_PRODUCTION_INDEX_ID || secrets.ORAMA_INDEX_ID }}
149145
ORAMA_SECRET_KEY: ${{ github.event_name == 'push' && secrets.ORAMA_PRODUCTION_SECRET_KEY || secrets.ORAMA_SECRET_KEY }}
150146
if: matrix.os == 'ubuntu-latest' && github.event_name != 'merge_group'
151147
working-directory: apps/site
152-
run: pnpm sync-orama
148+
run: node --run sync-orama

.github/workflows/chromatic.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
paths:
1515
- packages/ui-components/**
1616
- .github/workflows/chromatic.yml
17-
pull_request_target:
17+
pull_request:
1818
branches:
1919
- main
2020
paths:
@@ -38,7 +38,7 @@ jobs:
3838
# We only need to run Storybook Builds and Storybook Visual Regression Tests within Pull Requests that actually
3939
# introduce changes to the Storybook. Hence, we skip running these on Crowdin PRs and Dependabot PRs
4040
if: |
41-
github.event_name != 'pull_request_target' ||
41+
github.event_name != 'pull_request' ||
4242
(
4343
github.event.label.name == 'github_actions:pull-request' &&
4444
github.actor != 'dependabot[bot]' &&
@@ -62,15 +62,13 @@ jobs:
6262
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6363
with:
6464
# Provides the Pull Request commit SHA or the GitHub merge group ref
65-
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
65+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
6666
# The Chromatic (@chromaui/action) Action requires a full history of the current branch in order to be able to compare
6767
# previous changes and previous commits and determine which Storybooks should be tested against and what should be built
6868
fetch-depth: 0
6969

7070
- name: Set up pnpm
7171
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
72-
with:
73-
cache: true
7472

7573
- name: Set up Node.js
7674
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0

.github/workflows/lint-and-tests.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ permissions:
3333
actions: read
3434

3535
env:
36-
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--force
37-
TURBO_FORCE: true
36+
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
37+
TURBO_ARGS: --cache-dir=.turbo/cache
3838

3939
jobs:
4040
lint:
@@ -70,8 +70,6 @@ jobs:
7070
7171
- name: Set up pnpm
7272
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
73-
with:
74-
cache: true
7573

7674
- name: Set up Node.js
7775
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
@@ -90,7 +88,7 @@ jobs:
9088
if: |
9189
(github.event_name == 'push' || github.event_name == 'merge_group') ||
9290
(github.event_name == 'pull_request' && github.event.pull_request.head.ref != 'chore/crowdin')
93-
run: pnpm exec turbo lint check-types prettier
91+
run: node_modules/.bin/turbo lint lint:types prettier
9492

9593
- name: Save Lint Cache
9694
# We only want to save caches on `push` events or `pull_request_target` events
@@ -127,8 +125,6 @@ jobs:
127125

128126
- name: Set up pnpm
129127
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
130-
with:
131-
cache: true
132128

133129
- name: Set up Node.js
134130
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
@@ -143,7 +139,7 @@ jobs:
143139
- name: Run Unit Tests
144140
# We want to run Unit Tests in every circumstance, including Crowdin PRs and Dependabot PRs to ensure
145141
# that changes to dependencies or translations don't break the Unit Tests
146-
run: pnpm test:ci
142+
run: node_modules/.bin/turbo test:ci
147143

148144
- name: Upload test coverage to Codecov
149145
if: ${{ !cancelled() && github.event_name != 'merge_group' }}

.github/workflows/playwright-cloudflare-open-next.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ jobs:
4040

4141
- name: Set up pnpm
4242
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
43-
with:
44-
cache: true
4543

4644
- name: Set up Node.js
4745
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
@@ -56,7 +54,7 @@ jobs:
5654
- name: Get Playwright version
5755
id: playwright-version
5856
working-directory: apps/site
59-
run: echo "version=$(pnpm exec playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
57+
run: echo "version=$(node_modules/.bin/playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
6058

6159
- name: Cache Playwright browsers
6260
id: playwright-cache
@@ -67,11 +65,11 @@ jobs:
6765

6866
- name: Install Playwright Browsers
6967
working-directory: apps/site
70-
run: pnpm exec playwright install --with-deps
68+
run: node_modules/.bin/playwright install --with-deps
7169

7270
- name: Run Playwright tests
7371
working-directory: apps/site
74-
run: pnpm playwright
72+
run: node_modules/.bin/turbo playwright
7573
env:
7674
PLAYWRIGHT_RUN_CLOUDFLARE_PREVIEW: true
7775
PLAYWRIGHT_BASE_URL: http://127.0.0.1:8787

.github/workflows/playwright.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ jobs:
6666

6767
- name: Set up pnpm
6868
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
69-
with:
70-
cache: true
7169

7270
- name: Set up Node.js
7371
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
@@ -82,7 +80,7 @@ jobs:
8280
- name: Get Playwright version
8381
id: playwright-version
8482
working-directory: apps/site
85-
run: echo "version=$(pnpm exec playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
83+
run: echo "version=$(node_modules/.bin/playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
8684

8785
- name: Cache Playwright browsers
8886
id: playwright-cache
@@ -93,11 +91,11 @@ jobs:
9391

9492
- name: Install Playwright Browsers
9593
working-directory: apps/site
96-
run: pnpm exec playwright install --with-deps
94+
run: node_modules/.bin/playwright install --with-deps
9795

9896
- name: Run Playwright tests
9997
working-directory: apps/site
100-
run: pnpm playwright
98+
run: node_modules/.bin/turbo playwright
10199
env:
102100
PLAYWRIGHT_BASE_URL: ${{ needs.get-vercel-preview.outputs.url }}
103101

.github/workflows/publish-packages.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ jobs:
105105

106106
- name: Set up pnpm
107107
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
108-
with:
109-
cache: true
110108

111109
- name: Setup Node.js
112110
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0

.github/workflows/translations-sync.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ jobs:
9494
9595
- name: Set up pnpm
9696
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
97-
with:
98-
cache: true
9997

10098
- name: Set up Node.js
10199
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
@@ -109,10 +107,10 @@ jobs:
109107

110108
- name: Run ESLint
111109
working-directory: apps/site
112-
run: pnpm lint:md --fix
110+
run: node --run lint:md -- --fix
113111

114112
- name: Run Prettier
115-
run: pnpm prettier:fix
113+
run: node --run prettier:fix
116114

117115
- name: Push Changes back to Pull Request
118116
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0

.gitignore

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ npm-debug.log
99
package-lock.json
1010

1111
# Next.js Build Output
12-
.next
13-
build
12+
apps/site/.next
13+
apps/site/build
14+
apps/site/public/blog-data.json
1415

1516
# Test Runner
1617
junit.xml
@@ -35,14 +36,10 @@ cache
3536
tsconfig.tsbuildinfo
3637
dist/
3738

38-
# Ignore the blog-data json that we generate during dev and build
39-
apps/site/public/blog-data.json
40-
4139
# Cloudflare Build Output
4240
apps/site/.open-next
4341
apps/site/.wrangler
4442

45-
4643
## Playwright
4744
test-results
4845
playwright-report

.husky/pre-commit

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# lint and format staged files
2-
pnpm exec lint-staged
2+
3+
node --run lint:staged
34

45
# verify typescript fully
5-
pnpm check-types
6+
7+
node --run lint:types

.lintstagedrc.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{
2-
"**/*.{js,mjs,ts,tsx,md,mdx}": [
3-
"turbo run lint:lint-staged --",
4-
"prettier --check --write"
5-
],
6-
"**/*.css": ["stylelint --allow-empty-input", "prettier --write"],
7-
"**/*.{json,yml}": ["prettier --check --write"]
2+
"**/*.{js,mjs,ts,tsx,md,mdx,json.yml}": ["prettier --check --write"]
83
}

0 commit comments

Comments
 (0)