1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/content/copilot/tutorials/spark/deploy-from-cli.md
2025-11-14 11:01:05 +00:00

3.2 KiB
Raw Blame History

title, shortTitle, intro, allowTitleToDifferFromFilename, topics, versions, product, contentType
title shortTitle intro allowTitleToDifferFromFilename topics versions product contentType
Deploy your Spark app from the command line Deploy from CLI Learn how to deploy your {% data variables.product.prodname_spark_short %} app from the command line. true
Copilot
CLI
feature
spark
{% data variables.copilot.copilot_pro_plus_short %}, {% data variables.copilot.copilot_enterprise_short %} tutorials

Introduction

If youre developing your spark further in a {% data variables.product.github %} codespace, you can deploy it directly from the command line using the {% data variables.product.prodname_spark_short %} CLI, an extension of the {% data variables.product.prodname_cli %}.

Prerequisites

  • Access to {% data variables.product.prodname_copilot %}. You need a {% data variables.copilot.copilot_pro_plus_short %} or {% data variables.copilot.copilot_enterprise_short %} license to use {% data variables.product.prodname_spark_short %}. See AUTOTITLE.
  • You must have built a {% data variables.product.prodname_spark_short %} app (a "spark"). To start building, navigate to {% data variables.product.prodname_spark_short %}.
  • You have created a repository for your spark on {% data variables.product.github %}. For instructions, see AUTOTITLE.

Open your spark in a codespace

The {% data variables.product.prodname_spark_short %} CLI currently only works within a {% data variables.product.github %} codespace.

  1. Navigate to the main page of your spark's repository on {% data variables.product.github %}.
  2. Click the {% octicon "code" aria-hidden="true" aria-label="code" %} Code button, then click the Codespaces tab.
  3. Click {% octicon "plus" aria-label="Create a codespace on main" %} to create a codespace. The codespace opens in a new browser tab.

Install the {% data variables.product.prodname_spark_short %} CLI

  1. In the terminal in your codespace, run the following command to install the {% data variables.product.prodname_spark_short %} CLI:

    gh extensions install github/gh-runtime-cli
    
  2. Once the installation is complete, to verify that the {% data variables.product.prodname_spark_short %} CLI is installed, run:

    gh runtime-cli version
    

Build your spark

  1. In the terminal in your codespace, run the following command to install the latest version of the {% data variables.product.prodname_spark_short %} SDK:

    npm install @github/spark@latest
    
  2. Next, run the following command to compile your {% data variables.product.prodname_spark_short %} app.

    npm run build
    

Deploy your spark

  1. To deploy your {% data variables.product.prodname_spark_short %} app, run:

    gh runtime-cli deploy --dir ./dist
    

Troubleshooting

If you're being asked to supply the --app parameter when deploying your spark, update to the latest version of the {% data variables.product.prodname_spark_short %} SDK by following step 1 in Build your spark.