Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci-cd-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 28 additions & 22 deletions .github/workflows/ci-cd-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-<vCPUs>, 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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <commit> image, which a release tags.
concurrency:
Expand All @@ -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
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -47,7 +53,7 @@ jobs:
run: pnpm typecheck

release:
runs-on: ubuntu-latest
runs-on: gf-public-4
timeout-minutes: 60
needs: [checks]
permissions:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/website-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions website/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading