> For AI agents: the complete documentation index is available at /ja/llms.txt, the full documentation bundle is available at /ja/llms-full.txt.

# `build-env`

Vercel側でビルドする際に設定する環境変数を指定するためのオプションです。

::: tip
[prebuilt](/ja/references/inputs/optional/prebuilt.md)を有効にしている場合、`vercel build`実行時に環境変数を設定するようにします。
:::

## 使用例

```yaml {31-33} file="/snippets/references/inputs/build-env.yml"
name: Vercel

on:
  push:
    branches: [main]
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    permissions:
      contents: read
      deployments: write
      statuses: write
      pull-requests: write

    steps:
      - uses: actions/checkout@v7

      - uses: nexterias/actions-vercel@v2
        with:
          token: ${{ secrets.VERCEL_TOKEN }}
          org-id: ${{ secrets.VERCEL_ORG_ID }}
          project-id: ${{ secrets.VERCEL_PROJECT_ID }}
          production: ${{ github.ref == 'refs/heads/main' }}
          build-env: |
            FOO=BAR
            BAZ=QUX

```
