Add Activepieces integration for workflow automation
- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
82
activepieces-fork/docs/build-pieces/misc/pieces-ci-cd.mdx
Normal file
82
activepieces-fork/docs/build-pieces/misc/pieces-ci-cd.mdx
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
title: 'Custom Pieces CI/CD'
|
||||
icon: 'hammer'
|
||||
---
|
||||
|
||||
You can use the CLI to sync custom pieces. There is no need to rebuild the Docker image as they are loaded directly from npm.
|
||||
|
||||
### How It Works
|
||||
|
||||
Use the CLI to sync items from `packages/pieces/custom/` to instances. In production, Activepieces acts as an npm registry, storing all piece versions.
|
||||
|
||||
The CLI scans the directory for `package.json` files, checking the **name** and **version** of each piece. If a piece isn't uploaded, it packages and uploads it via the API.
|
||||
|
||||
### Usage
|
||||
|
||||
To use the CLI, follow these steps:
|
||||
|
||||
1. Generate an API Key from the Admin Interface. Go to Settings and generate the API Key.
|
||||
2. Install the CLI by cloning the repository.
|
||||
3. Run the following command, replacing `API_KEY` with your generated API Key and `INSTANCE_URL` with your instance URL:
|
||||
|
||||
|
||||
```bash
|
||||
AP_API_KEY=your_api_key_here bun run sync-pieces -- --apiUrl https://INSTANCE_URL/api
|
||||
```
|
||||
|
||||
### Developer Workflow
|
||||
|
||||
1. Developers create and modify the pieces offline.
|
||||
2. Increment the piece version in their corresponding `package.json`. For more information, refer to the [piece versioning](../piece-reference/piece-versioning) documentation.
|
||||
3. Open a pull request towards the main branch.
|
||||
4. Once the pull request is merged to the main branch, manually run the CLI or use a GitHub/GitLab Action to trigger the synchronization process.
|
||||
|
||||
### GitHub Action
|
||||
|
||||
```yaml
|
||||
name: Sync Custom Pieces
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync-pieces:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Step 1: Check out the repository code with full history
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Step 2: Set up Bun
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
# Step 3: Cache Bun dependencies
|
||||
- name: Cache Bun dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.bun/install/cache
|
||||
key: bun-${{ hashFiles('bun.lockb') }}
|
||||
restore-keys: |
|
||||
bun-
|
||||
|
||||
# Step 4: Install dependencies using Bun
|
||||
- name: Install dependencies
|
||||
run: bun install --no-save
|
||||
|
||||
# Step 5: Sync Custom Pieces
|
||||
- name: Sync Custom Pieces
|
||||
env:
|
||||
AP_API_KEY: ${{ secrets.AP_API_KEY }}
|
||||
run: bun run sync-pieces -- --apiUrl ${{ secrets.INSTANCE_URL }}/api
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user