diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 529415df89..35c2fb19b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,14 +3,12 @@ name: ci on: pull_request: branches: - - redesign - - gh-pages + - main pull_request_review: types: [submitted] push: branches: - - redesign - - gh-pages + - main # Cancel in progress workflows # in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run @@ -38,9 +36,8 @@ jobs: - name: Set up Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: - # node-version-file: ".nvmrc" use when .nvmrc is on root of the repo - node-version: '24.13' - # cache: "npm" use when package-lock.json is on root of the repo + node-version-file: '.nvmrc' + cache: 'npm' - name: Install Node.js dependencies run: npm ci @@ -98,6 +95,7 @@ jobs: --root-dir $PWD/dist --exclude-path dist/llms.txt --exclude-path dist/llms/ + --exclude-private --remap "https://expressjs\.com\/((?:[^\/]+\/)*[^\/\.]+)\/?$ file://$PWD/dist/\$1/index.html" --remap "https://expressjs\.com\/(.*\.html)$ file://$PWD/dist/\$1" dist/ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 50f41b675d..407cb67e64 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,10 +13,10 @@ name: 'CodeQL' on: push: - branches: ['gh-pages'] + branches: ['main'] pull_request: # The branches below must be a subset of the branches above - branches: ['gh-pages'] + branches: ['main'] schedule: - cron: '0 0 * * 1' diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index 340d84ce83..7cd0e22263 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -2,7 +2,7 @@ name: Crowdin Upload on: push: - branches: [gh-pages] + branches: [main] workflow_dispatch: permissions: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b0171e517d..4710f6b56a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,7 @@ name: Deploy Website on: push: branches: - - gh-pages + - main workflow_dispatch: permissions: @@ -29,6 +29,9 @@ jobs: path: . package-manager: npm out-dir: dist + env: + PUBLIC_ORAMA_PROJECT_ID: ${{ secrets.PUBLIC_ORAMA_PRODUCTION_PROJECT_ID }} + PUBLIC_ORAMA_API_KEY: ${{ secrets.PUBLIC_ORAMA_PRODUCTION_API_KEY }} deploy: name: deploy diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 215bd97f65..e96169b1df 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -3,8 +3,7 @@ name: Playwright Tests on: pull_request: branches: - - redesign - - gh-pages + - main concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -26,7 +25,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: - node-version: '24.13' + node-version-file: '.nvmrc' cache: 'npm' - name: Wait for Netlify preview diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 1f92ab45a8..72e48f670e 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -12,7 +12,7 @@ on: schedule: - cron: '20 7 * * 2' push: - branches: ['gh-pages'] + branches: ['main'] # Declare default permissions as read only. permissions: read-all diff --git a/.github/workflows/sync-orama.yml b/.github/workflows/sync-orama.yml index b1c9f9fd1d..927cc82d95 100644 --- a/.github/workflows/sync-orama.yml +++ b/.github/workflows/sync-orama.yml @@ -4,12 +4,10 @@ on: workflow_dispatch: push: branches: - - redesign - - gh-pages + - main pull_request: branches: - - redesign - - gh-pages + - main permissions: contents: read @@ -22,29 +20,24 @@ jobs: sync-orama-cloud: name: Sync Orama Cloud runs-on: ubuntu-latest - env: - HAS_API_KEY_SECRET: ${{ github.event_name == 'push' || secrets.PRIVATE_ORAMA_API_KEY != '' }} + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository steps: - name: 'Checkout' - if: ${{ env.HAS_API_KEY_SECRET == 'true' }} uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: persist-credentials: false - name: Set up Node.js - if: ${{ env.HAS_API_KEY_SECRET == 'true' }} uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version-file: '.nvmrc' cache: 'npm' - name: Install Node.js dependencies - if: ${{ env.HAS_API_KEY_SECRET == 'true' }} run: npm ci - name: Sync Orama Cloud - if: ${{ env.HAS_API_KEY_SECRET == 'true' }} run: node ./scripts/sync-orama.mjs env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-external-docs.yml b/.github/workflows/update-external-docs.yml index fbc7593e37..cff196a4ae 100644 --- a/.github/workflows/update-external-docs.yml +++ b/.github/workflows/update-external-docs.yml @@ -67,7 +67,8 @@ jobs: - name: Set up Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: lts/* + node-version-file: '.nvmrc' + cache: 'npm' - name: Install dependencies run: npm ci @@ -107,7 +108,8 @@ jobs: - name: Set up Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: - node-version: '24.13' + node-version-file: '.nvmrc' + cache: 'npm' - name: Install dependencies run: npm ci