open-index/open-npm huggingface dataset:
npm package: @fold-run/github-action
Description: GitHub Action for deploying functions to fold.run
Latest version: 1.0.1

# fold.run Deploy Action

Deploy a function to [fold.run](https://fold.run) from a GitHub Actions workflow. Bundles TypeScript automatically with esbuild before uploading.

## Usage

```yaml
- uses: fold-run/deploy@v1
  with:
    fold-token: ${{ secrets.FOLD_TOKEN }}
    tenant-id: my-tenant
    function-name: my-function
    file: src/worker.ts
```

## Inputs

| Input | Required | Default | Description |
|---|---|---|---|
| `fold-token` | yes | — | fold.run API token. Store as a repository secret. |
| `tenant-id` | yes | — | Your fold.run tenant ID (found in the dashboard under Settings). |
| `function-name` | yes | — | Name of the function to deploy. |
| `file` | yes | — | Path to the entry file (TypeScript or JavaScript). |
| `working-directory` | no | `.` | Working directory for resolving the entry file. |
| `api-url` | no | `https://api.fold.run` | Override the fold.run API URL (advanced). |

## Outputs

| Output | Description |
|---|---|
| `function-id` | ID of the deployed function. |
| `version` | Deployed version number. |
| `url` | Invocation URL: `https://<tenant-id>.fold.run/<function-name>`. |

## Example workflow

```yaml
name: Deploy

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: fold-run/deploy@v1
        id: deploy
        with:
          fold-token: ${{ secrets.FOLD_TOKEN }}
          tenant-id: my-tenant
          function-name: my-api
          file: src/worker.ts

      - run: echo "Deployed to ${{ steps.deploy.outputs.url }}"
```

## Setup

1. Create a fold.run account at [app.fold.run/console/signup](https://app.fold.run/console/signup).
2. Generate an API token in the dashboard under **Settings → API Keys**.
3. Add it as a repository secret named `FOLD_TOKEN`.
4. Find your tenant ID in **Settings → General**.