diff --git a/.github/workflows/ci-cd-production.yml b/.github/workflows/ci-cd-production.yml index 3ca7c781c007..3d6d99911d61 100644 --- a/.github/workflows/ci-cd-production.yml +++ b/.github/workflows/ci-cd-production.yml @@ -10,9 +10,11 @@ env: HEALTH_CHECK_URL: https://thegraph.com/docs APP_NAME: graph-docs +# The build runs on the Foundation's public runner pool gf-public-8 on forge. The deploy runs on a +# GitHub-hosted runner: it holds the production GCP credentials, which never go to forge's pools. jobs: build: - runs-on: ubuntu-latest + runs-on: gf-public-8 steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.12.1 diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 0805547df75b..2825360974a2 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -2,13 +2,16 @@ name: Pull Request CI/CD on: pull_request +# Jobs run on the Foundation's public runner pools on forge (gf-public-, a fresh VM per +# job): the checks on 4 vCPUs, the image build on 8. The build does not wait for the checks. + env: IMAGE: ghcr.io/graphprotocol/graph-docs jobs: lint: if: contains(github.head_ref, 'crowdin') == false - runs-on: ubuntu-latest + runs-on: gf-public-4 steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.12.1 @@ -18,20 +21,24 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 - - name: Set up env - uses: the-guild-org/shared-config/setup@v1 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: 22 + cache: pnpm - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Lint run: pnpm lint format: if: contains(github.head_ref, 'crowdin') == false - runs-on: ubuntu-latest + runs-on: gf-public-4 steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.12.1 @@ -41,20 +48,24 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 - - name: Set up env - uses: the-guild-org/shared-config/setup@v1 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: 22 + cache: pnpm - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Check formatting run: pnpm prettier:check typecheck: if: contains(github.head_ref, 'crowdin') == false - runs-on: ubuntu-latest + runs-on: gf-public-4 steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.12.1 @@ -64,21 +75,24 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 - - name: Set up env - uses: the-guild-org/shared-config/setup@v1 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: 22 + cache: pnpm - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Typecheck run: pnpm typecheck build: if: contains(github.head_ref, 'crowdin') == false - runs-on: ubuntu-latest - needs: [lint, format, typecheck] + runs-on: gf-public-8 steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.12.1 @@ -88,14 +102,6 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 - - name: Set up env - uses: the-guild-org/shared-config/setup@v1 - with: - node-version: 22 - - - name: Install dependencies - run: pnpm install - - name: Build Docker image uses: docker/build-push-action@v5 with: diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index cd33f4f9dae6..bfec3f654cab 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -14,6 +14,9 @@ on: # graphprotocol/graph-infra: Kargo follows latest. A v* tag releases a commit's image under the # tag's name (release.yml). +# The build runs on the Foundation's public runner pool gf-public-8 on forge (8 vCPUs, a fresh VM +# per job). + # Runs of one branch build one at a time and in order, so latest only moves forward. A run is not # cancelled: every commit it builds keeps its image, which a release tags. concurrency: @@ -29,7 +32,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: gf-public-8 steps: - name: Check out the repo uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ea4029343a6..4af121d33009 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,8 @@ on: # move latest. Production Kargo follows these version tags (graphprotocol/graph-infra). # ci-cd-production.yml still builds and deploys production from the same tags, separately. +# Both jobs run on the Foundation's public runner pool gf-public-4 on forge. + # Releases run one at a time, and none is cancelled. concurrency: group: release @@ -24,18 +26,22 @@ env: jobs: checks: - runs-on: ubuntu-latest + runs-on: gf-public-4 steps: - name: Check out the repo uses: actions/checkout@v4 - - name: Set up env - uses: the-guild-org/shared-config/setup@v1 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: 22 + cache: pnpm - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Lint run: pnpm lint @@ -47,7 +53,7 @@ jobs: run: pnpm typecheck release: - runs-on: ubuntu-latest + runs-on: gf-public-4 timeout-minutes: 60 needs: [checks] permissions: diff --git a/.github/workflows/website-integrity.yml b/.github/workflows/website-integrity.yml index 2e3ede255986..f67f09df9d64 100644 --- a/.github/workflows/website-integrity.yml +++ b/.github/workflows/website-integrity.yml @@ -7,7 +7,8 @@ on: - main jobs: website-check: - runs-on: ubuntu-latest + # The Foundation's public runner pool on forge: a full site build on 8 vCPUs. + runs-on: gf-public-8 steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 @@ -20,10 +21,17 @@ jobs: - name: Fetch run: git fetch origin main - - name: Set up env - uses: the-guild-org/shared-config/setup@v1 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Run pre-build scripts run: pnpm prebuild:ci diff --git a/website/next.config.js b/website/next.config.js index b6a3697427f7..220c5b1c4785 100644 --- a/website/next.config.js +++ b/website/next.config.js @@ -112,6 +112,9 @@ const withNextra = nextra({ export default withNextra({ env, output: 'export', + // A static export serves no Node.js server, so it needs no file traces: tracing would take most + // of the build and its files never reach `out`. + outputFileTracing: false, distDir: process.env.NODE_ENV === 'production' ? '../out/docs' : undefined, experimental: { // Fix scroll restoration (see https://github.com/vercel/next.js/issues/37893#issuecomment-1221335543)