docs: Templates on navigation #114245
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
types: [opened, synchronize] | |
name: Generate Pull Request Stats | |
env: | |
NAPI_CLI_VERSION: 2.18.4 | |
TURBO_VERSION: 2.5.5 | |
NODE_LTS_VERSION: 20 | |
TEST_CONCURRENCY: 6 | |
TURBO_TEAM: 'vercel' | |
TURBO_CACHE: 'remote:rw' | |
NEXT_TELEMETRY_DISABLED: 1 | |
# we build a dev binary for use in CI so skip downloading | |
# canary next-swc binaries in the monorepo | |
NEXT_SKIP_NATIVE_POSTINSTALL: 1 | |
# Vercel KV Store for test timings | |
KV_REST_API_URL: ${{ secrets.KV_REST_API_URL }} | |
KV_REST_API_TOKEN: ${{ secrets.KV_REST_API_TOKEN }} | |
NEXT_TEST_JOB: 1 | |
NEXT_DISABLE_SWC_WASM: 1 | |
jobs: | |
build: | |
uses: ./.github/workflows/build_reusable.yml | |
secrets: inherit | |
with: | |
stepName: 'generate-pull-request-stats' | |
uploadSwcArtifact: 'yes' | |
uploadAnalyzerArtifacts: 'yes' | |
stats: | |
name: PR Stats | |
needs: build | |
timeout-minutes: 25 | |
runs-on: | |
- 'self-hosted' | |
- 'linux' | |
- 'x64' | |
- 'metal' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 25 | |
- name: Check non-docs only change | |
run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT | |
id: docs-change | |
- uses: actions/download-artifact@v4 | |
if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} | |
with: | |
name: next-swc-binary | |
path: packages/next-swc/native | |
- run: cp -r packages/next-swc/native .github/actions/next-stats-action/native | |
if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} | |
- uses: ./.github/actions/next-stats-action | |
if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} | |
env: | |
# This uses the webpack bundle analyzer and for consistent results we need to use webpack. | |
# Once there is an equivalent analyzer for turbopack, we can remove this. | |
IS_WEBPACK_TEST: 1 |