## Simplify `create-twenty-app` for zero-interaction use Makes `npx create-twenty-app@latest my-app` a fully non-interactive, single-command experience suitable for automated environments (Codex, Claude plugins). ### Changes - **Remove all interactive prompts** — app name, display name, description, and scaffold confirmation are now derived from CLI args with sensible defaults. `inquirer` dependency removed entirely. - **Replace OAuth with API key auth** — use the seeded dev API key (`DEV_API_KEY`) to authenticate against the Docker instance as `[email protected]`, eliminating the browser-based OAuth flow. - **Docker-first with early validation** — check Docker is installed before scaffolding; if missing, print the install URL and exit. Detect alternative runtimes (Podman, nerdctl). - **Parallel image pull** — `docker pull` runs in the background during scaffold + dependency install, saving 10-30s on typical runs. - **Always pull latest image** — ensures the dev server is up-to-date on every run. - **Stop detecting port 3000** — only check port 2020 (Docker instance). - **Update CLI flags** — remove `--skip-local-instance` and `--yes`; add `--skip-docker`. - **Update CI workflows and docs** — align e2e workflows, package README, and template README/cd.yml with the new flow.
43 lines
997 B
YAML
43 lines
997 B
YAML
name: CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types: [labeled]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
TWENTY_DEPLOY_URL: http://localhost:2020
|
|
|
|
concurrency:
|
|
group: cd-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy-and-install:
|
|
if: >-
|
|
github.event_name == 'push' ||
|
|
(github.event_name == 'pull_request' && github.event.label.name == 'deploy')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
|
|
- name: Deploy
|
|
uses: twentyhq/twenty/.github/actions/deploy-twenty-app@main
|
|
with:
|
|
api-url: ${{ env.TWENTY_DEPLOY_URL }}
|
|
api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }}
|
|
|
|
- name: Install
|
|
uses: twentyhq/twenty/.github/actions/install-twenty-app@main
|
|
with:
|
|
api-url: ${{ env.TWENTY_DEPLOY_URL }}
|
|
api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }}
|