Skip to content

Commit da0d4df

Browse files
committed
chore: updated workflow types
1 parent 7ae313d commit da0d4df

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 8 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:
@@ -33,10 +33,10 @@ env:
3333

3434
jobs:
3535
build:
36-
# This Job should run either on non-`pull_request_target` events,
37-
# 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`
3838
# since we want to run Website Builds on all these occasions. As this allows us to be certain the that builds are passing
39-
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'
4040

4141
name: Build on ${{ matrix.os }}
4242
runs-on: ${{ matrix.os }}
@@ -62,7 +62,7 @@ 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
# We only need to fetch the last commit from the head_ref
6767
# since we're not using the `--filter` operation from turborepo
6868
# We don't use the `--filter` as we always want to force builds regardless of having changes or not
@@ -122,7 +122,7 @@ jobs:
122122
# in order to reduce source wastages and build times.
123123
# Note that we skip full static builds on Crowdin-based Pull Requests as these PRs should only contain translation changes
124124
if: |
125-
(github.event_name == 'pull_request_target' &&
125+
(github.event_name == 'pull_request' &&
126126
github.event.pull_request.head.ref != 'chore/crowdin')
127127
run: node_modules/.bin/turbo deploy -- ${{ env.TURBO_ARGS }}
128128
env:
@@ -132,12 +132,12 @@ jobs:
132132
NODE_OPTIONS: '--max_old_space_size=4096'
133133
# Used for API requests that require GitHub API scopes
134134
NEXT_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
135-
# 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
136136
NEXT_PUBLIC_STATIC_EXPORT_LOCALE: false
137137

138138
- name: Sync Orama Cloud
139139
# We only want to sync the Orama Cloud production indexes on `push` events.
140-
# 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).
141141
# We also want to ensure that the sync only happens on the `ubuntu-latest` runner to avoid duplicate syncs
142142
# or Windows-based path issues.
143143
env:

.github/workflows/chromatic.yml

Lines changed: 3 additions & 3 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,7 +62,7 @@ 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

apps/site/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
"name": "@node-core/website",
33
"type": "module",
44
"scripts": {
5+
"prebuild": "node --run build:blog-data",
56
"build": "node --run build:default -- --turbo",
67
"build:blog-data": "cross-env NODE_NO_WARNINGS=1 node ./scripts/blog-data/generate.mjs",
78
"build:blog-data:watch": "node --watch --watch-path=pages/en/blog ./scripts/blog-data/generate.mjs",
89
"build:default": "cross-env NODE_NO_WARNINGS=1 next build",
910
"cloudflare:build:worker": "opennextjs-cloudflare build",
1011
"cloudflare:deploy": "wrangler deploy",
1112
"cloudflare:preview": "wrangler dev",
13+
"predeploy": "node --run build:blog-data",
1214
"deploy": "cross-env NEXT_PUBLIC_STATIC_EXPORT=true node --run build:default",
15+
"predev": "node --run build:blog-data",
1316
"dev": "cross-env NODE_NO_WARNINGS=1 next dev --turbo",
1417
"lint": "turbo run lint:md lint:js lint:css",
1518
"lint:css": "stylelint \"**/*.css\" --allow-empty-input --cache --cache-strategy=content --cache-location=.stylelintcache",
@@ -18,8 +21,6 @@
1821
"lint:md": "eslint \"**/*.md?(x)\" --cache --cache-strategy=content --cache-location=.eslintmdcache",
1922
"lint:types": "tsc --noEmit",
2023
"playwright": "playwright test",
21-
"prebuild": "node --run build:blog-data",
22-
"predeploy": "node --run build:blog-data",
2324
"scripts:release-post": "cross-env NODE_NO_WARNINGS=1 node scripts/release-post/index.mjs",
2425
"serve": "node --run dev",
2526
"start": "cross-env NODE_NO_WARNINGS=1 next start",

0 commit comments

Comments
 (0)