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

# `github-token`

Specify a GitHub Personal Access Token or `secrets.GITHUB_TOKEN`.

By default, **secrets.GITHUB\_TOKEN** is used.

::: danger Caution
The value entered for `github-token` is **sensitive information**, so use [Secrets](/guide/getting-started.md#github-secrets) instead of writing it directly in a file.
:::

## When it is used

Depending on the granted permissions, it performs the following operations.

- Creating and updating commit statuses
- Creating and updating Deployments
- Creating and updating pull request comments

## Required permissions

If the required permissions are not granted, they are skipped and Vercel is deployed as usual. Grant and configure the permissions you need according to your preference.

### For `secrets.GITHUB_TOKEN`

| Permission      | Description                                                |
| --------------- | ---------------------------------------------------------- |
| `deployments`   | Set to `write` when creating and updating Deployments.     |
| `statuses`      | Set to `write` when creating and updating commit statuses. |
| `pull-requests` | Set to `write` when creating pull request comments.        |

```yaml {18-20,31} file="/snippets/references/inputs/github-token.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' }}
          github-token: ${{ secrets.GITHUB_TOKEN }}

```

### For a Personal Access Token

The `repo` scope is required.
