@fold-run/github-action
v1.0.1
Published
GitHub Action for deploying functions to fold.run
Downloads
187
Readme
fold.run Deploy Action
Deploy a function to fold.run from a GitHub Actions workflow. Bundles TypeScript automatically with esbuild before uploading.
Usage
- uses: fold-run/deploy@v1
with:
fold-token: ${{ secrets.FOLD_TOKEN }}
tenant-id: my-tenant
function-name: my-function
file: src/worker.tsInputs
| 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
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
- Create a fold.run account at app.fold.run/console/signup.
- Generate an API token in the dashboard under Settings → API Keys.
- Add it as a repository secret named
FOLD_TOKEN. - Find your tenant ID in Settings → General.
