## Summary - Adds `deploy-twenty-app` and `install-twenty-app` composite actions to `.github/actions/` so app repos can reference them remotely — same pattern as `spawn-twenty-app-dev-test` for CI - Updates `cd.yml` in template, hello-world, and postcard to use `twentyhq/twenty/.github/actions/deploy-twenty-app@main` / `install-twenty-app@main` instead of local `./.github/actions/` copies - Removes the 6 local action files that were duplicated across template and example apps **Before** (each app repo carried its own action copies): ```yaml uses: ./.github/actions/deploy ``` **After** (centralized, like CI): ```yaml uses: twentyhq/twenty/.github/actions/deploy-twenty-app@main ``` Made with [Cursor](https://cursor.com)
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Deploy Twenty App
|
|
description: Build and deploy a Twenty app to a remote instance
|
|
|
|
inputs:
|
|
api-url:
|
|
description: Base URL of the target Twenty instance (e.g. https://my.twenty.instance)
|
|
required: true
|
|
api-key:
|
|
description: API key or access token for the target instance
|
|
required: true
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Enable Corepack
|
|
shell: bash
|
|
run: corepack enable
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: yarn
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: yarn install --immutable
|
|
|
|
- name: Configure remote
|
|
shell: bash
|
|
run: |
|
|
mkdir -p ~/.twenty
|
|
node -e "
|
|
const fs = require('fs'), path = require('path'), os = require('os');
|
|
fs.writeFileSync(path.join(os.homedir(), '.twenty', 'config.json'), JSON.stringify({
|
|
version: 1,
|
|
remotes: { target: { apiUrl: process.env.API_URL, apiKey: process.env.API_KEY } }
|
|
}, null, 2));
|
|
"
|
|
env:
|
|
API_URL: ${{ inputs.api-url }}
|
|
API_KEY: ${{ inputs.api-key }}
|
|
|
|
- name: Deploy
|
|
shell: bash
|
|
run: yarn twenty deploy --remote target
|