@fold-run/github-action 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+
2
+ > @fold-run/github-action@1.0.0 typecheck /Users/blake/Sites/cloudflare/ai-deploy-platform/packages/github-action
3
+ > tsc --noEmit
4
+
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # Fold Deploy Action
2
+
3
+ Deploy a function to [Fold](https://fold.run) from a GitHub Actions workflow. Bundles TypeScript automatically with esbuild before uploading.
4
+
5
+ ## Usage
6
+
7
+ ```yaml
8
+ - uses: fold-run/deploy@v1
9
+ with:
10
+ fold-token: ${{ secrets.FOLD_TOKEN }}
11
+ tenant-id: my-tenant
12
+ function-name: my-function
13
+ file: src/worker.ts
14
+ ```
15
+
16
+ ## Inputs
17
+
18
+ | Input | Required | Default | Description |
19
+ |---|---|---|---|
20
+ | `fold-token` | yes | — | Fold API token. Store as a repository secret. |
21
+ | `tenant-id` | yes | — | Your Fold tenant ID (found in the dashboard under Settings). |
22
+ | `function-name` | yes | — | Name of the function to deploy. |
23
+ | `file` | yes | — | Path to the entry file (TypeScript or JavaScript). |
24
+ | `working-directory` | no | `.` | Working directory for resolving the entry file. |
25
+ | `api-url` | no | `https://api.fold.run` | Override the Fold API URL (advanced). |
26
+
27
+ ## Outputs
28
+
29
+ | Output | Description |
30
+ |---|---|
31
+ | `function-id` | ID of the deployed function. |
32
+ | `version` | Deployed version number. |
33
+ | `url` | Invocation URL: `https://<tenant-id>.fold.run/<function-name>`. |
34
+
35
+ ## Example workflow
36
+
37
+ ```yaml
38
+ name: Deploy
39
+
40
+ on:
41
+ push:
42
+ branches: [main]
43
+
44
+ jobs:
45
+ deploy:
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+
50
+ - uses: fold-run/deploy@v1
51
+ id: deploy
52
+ with:
53
+ fold-token: ${{ secrets.FOLD_TOKEN }}
54
+ tenant-id: my-tenant
55
+ function-name: my-api
56
+ file: src/worker.ts
57
+
58
+ - run: echo "Deployed to ${{ steps.deploy.outputs.url }}"
59
+ ```
60
+
61
+ ## Setup
62
+
63
+ 1. Create a Fold account at [app.fold.run/console/signup](https://app.fold.run/console/signup).
64
+ 2. Generate an API token in the dashboard under **Settings → API Keys**.
65
+ 3. Add it as a repository secret named `FOLD_TOKEN`.
66
+ 4. Find your tenant ID in **Settings → General**.
package/action.yml ADDED
@@ -0,0 +1,39 @@
1
+ name: 'Fold Deploy'
2
+ description: 'Deploy a function to Fold'
3
+ branding:
4
+ icon: 'upload-cloud'
5
+ color: 'blue'
6
+
7
+ inputs:
8
+ fold-token:
9
+ description: 'Fold API token. Use ${{ secrets.FOLD_TOKEN }}'
10
+ required: true
11
+ tenant-id:
12
+ description: 'Your Fold tenant ID (find it in the dashboard under Settings)'
13
+ required: true
14
+ function-name:
15
+ description: 'Name of the function to deploy'
16
+ required: true
17
+ file:
18
+ description: 'Path to the function entry file (TypeScript or JavaScript)'
19
+ required: true
20
+ working-directory:
21
+ description: 'Working directory for the deploy command'
22
+ required: false
23
+ default: '.'
24
+ api-url:
25
+ description: 'Override the Fold API URL (advanced)'
26
+ required: false
27
+ default: 'https://api.fold.run'
28
+
29
+ outputs:
30
+ function-id:
31
+ description: 'ID of the deployed function'
32
+ version:
33
+ description: 'Deployed version number'
34
+ url:
35
+ description: 'Invocation URL of the deployed function'
36
+
37
+ runs:
38
+ using: 'node20'
39
+ main: 'dist/index.js'