diff --git a/packages/create-twenty-app/src/constants/template/github/actions/deploy/action.yml b/.github/actions/deploy-twenty-app/action.yml similarity index 100% rename from packages/create-twenty-app/src/constants/template/github/actions/deploy/action.yml rename to .github/actions/deploy-twenty-app/action.yml diff --git a/packages/create-twenty-app/src/constants/template/github/actions/install/action.yml b/.github/actions/install-twenty-app/action.yml similarity index 100% rename from packages/create-twenty-app/src/constants/template/github/actions/install/action.yml rename to .github/actions/install-twenty-app/action.yml diff --git a/packages/create-twenty-app/src/constants/template/github/workflows/cd.yml b/packages/create-twenty-app/src/constants/template/github/workflows/cd.yml index 909916ed06..61cbcfd7ab 100644 --- a/packages/create-twenty-app/src/constants/template/github/workflows/cd.yml +++ b/packages/create-twenty-app/src/constants/template/github/workflows/cd.yml @@ -30,13 +30,13 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Deploy - uses: ./.github/actions/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: ./.github/actions/install + uses: twentyhq/twenty/.github/actions/install-twenty-app@main with: api-url: ${{ env.TWENTY_DEPLOY_URL }} api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }} diff --git a/packages/twenty-apps/examples/hello-world/.github/actions/deploy/action.yml b/packages/twenty-apps/examples/hello-world/.github/actions/deploy/action.yml deleted file mode 100644 index 371d202f2e..0000000000 --- a/packages/twenty-apps/examples/hello-world/.github/actions/deploy/action.yml +++ /dev/null @@ -1,46 +0,0 @@ -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 diff --git a/packages/twenty-apps/examples/hello-world/.github/actions/install/action.yml b/packages/twenty-apps/examples/hello-world/.github/actions/install/action.yml deleted file mode 100644 index 3f7ef535cf..0000000000 --- a/packages/twenty-apps/examples/hello-world/.github/actions/install/action.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Install Twenty App -description: Install (or upgrade) a Twenty app on a specific workspace - -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 workspace - 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: Install - shell: bash - run: yarn twenty install --remote target diff --git a/packages/twenty-apps/examples/hello-world/.github/workflows/cd.yml b/packages/twenty-apps/examples/hello-world/.github/workflows/cd.yml index 909916ed06..61cbcfd7ab 100644 --- a/packages/twenty-apps/examples/hello-world/.github/workflows/cd.yml +++ b/packages/twenty-apps/examples/hello-world/.github/workflows/cd.yml @@ -30,13 +30,13 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Deploy - uses: ./.github/actions/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: ./.github/actions/install + uses: twentyhq/twenty/.github/actions/install-twenty-app@main with: api-url: ${{ env.TWENTY_DEPLOY_URL }} api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }} diff --git a/packages/twenty-apps/examples/postcard/.github/actions/deploy/action.yml b/packages/twenty-apps/examples/postcard/.github/actions/deploy/action.yml deleted file mode 100644 index 371d202f2e..0000000000 --- a/packages/twenty-apps/examples/postcard/.github/actions/deploy/action.yml +++ /dev/null @@ -1,46 +0,0 @@ -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 diff --git a/packages/twenty-apps/examples/postcard/.github/actions/install/action.yml b/packages/twenty-apps/examples/postcard/.github/actions/install/action.yml deleted file mode 100644 index 3f7ef535cf..0000000000 --- a/packages/twenty-apps/examples/postcard/.github/actions/install/action.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Install Twenty App -description: Install (or upgrade) a Twenty app on a specific workspace - -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 workspace - 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: Install - shell: bash - run: yarn twenty install --remote target diff --git a/packages/twenty-apps/examples/postcard/.github/workflows/cd.yml b/packages/twenty-apps/examples/postcard/.github/workflows/cd.yml index 909916ed06..61cbcfd7ab 100644 --- a/packages/twenty-apps/examples/postcard/.github/workflows/cd.yml +++ b/packages/twenty-apps/examples/postcard/.github/workflows/cd.yml @@ -30,13 +30,13 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Deploy - uses: ./.github/actions/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: ./.github/actions/install + uses: twentyhq/twenty/.github/actions/install-twenty-app@main with: api-url: ${{ env.TWENTY_DEPLOY_URL }} api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }}