1010 push :
1111 branches :
1212 - main
13- pull_request_target :
13+ pull_request :
1414 branches :
1515 - main
1616 types :
@@ -30,15 +30,13 @@ permissions:
3030env :
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
3634jobs :
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 }}
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
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
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
0 commit comments