# Deploy an Archive Package

The workflow we build will take the following structure:

1. Execute a GitHub Actions job to build our application and upload as a Package using the [Chassy Upload Action](/operator-guides/integrating-with-github/upload-action.md).
2. Find Package in the Chassy Index and bring into the Workflow context.
3. Create a Release containing our Package.
4. Deploy this Release to our Testbed Machine.

{% hint style="info" %}
You will need a configured [Chassy Workspace](/getting-started/create-a-workspace.md) with the [GitHub Integration](/reference/integrations/github.md) enabled and a [Fleet](/user-guides/fleet-user-guide.md) with at least one Testbed Machine.
{% endhint %}

## GitHub Workflow Configuration

Our package takes the form of a ZIP archive containing a binary and a configuration file. With this in mind, our GitHub action will use the configurations below:

```yaml
      - name: Upload package to Chassy Index
        uses: chassyflow/actions-package-upload@v2.5.0
        with:
          name: "compute-with-config"
          architecture: "AMD64"
          os: "ubuntu"
          os_version: "20.04"
          version: "0.0.1"
          type: "ARCHIVE"
          path: "bundle.zip"
          entrypoint: |-
            ./launcher.sh
```

All code and configuration can be found within our [cargo-workspace-example](https://github.com/chassyflow/cargo-workspace-example) repository. The GitHub Actions workflow can be found in the [workflows directory](https://github.com/chassyflow/cargo-workspace-example/blob/7e094a6af660f016b422392a334df679316650a4/.github/workflows/bundle-with-config.yml).&#x20;

{% hint style="info" %}
An executable `entrypoint` argument must be provided for an executable archive.
{% endhint %}

### Bundle Contents

| Name         | Contents and Purpose                                                                                             |
| ------------ | ---------------------------------------------------------------------------------------------------------------- |
| compute      | binary written in Rust that performs lengthy computations based on either a config file or environment variables |
| web          | binary written in Rust that spins up a web server on port 8080                                                   |
| compute.toml | TOML configuration file for the compute binary                                                                   |
| launcher.sh  | A shell script that will run a specified binary and pass any arguments through.                                  |

## Chassy Workflow Configuration

We will now [create a Chassy Workflow](/user-guides/workflow-user-guide/creating-a-workflow.md). Let's first create a step to run the GitHub Actions workflow described in the previous section.

### Dispatch GitHub Actions Workflow

<figure><img src="/files/L5lLqvu9GPtXsC89LbZn" alt="We start the workflow with a Run CI Job step, entering details including the GitHub Workflow, repository name and owner, Git Ref, and Job Input."><figcaption></figcaption></figure>

This is a *Run CI Job* step configured to run a GitHub Actions workflow. We can specify the GitHub Workflow simply by using the workflow file name or by using the actual workflow ID obtainable through the GitHub API. We must specify the name of the repository, the name of the organization, and the name of the ref.

### Find Uploaded Bundle

<figure><img src="/files/evrcVJHfvDTvc2MxNKaj" alt="The Find Package step is next, pulling the package that was imported in the previous step into the context of our current workflow."><figcaption></figcaption></figure>

Next we create a [Find Package](/reference/workflow-components/steps.md#find-package) step, bringing in the imported Package by providing the package name, type, and status.

### Create Release

<figure><img src="/files/H2kgsDoZzjLYAumCrf6t" alt=""><figcaption></figcaption></figure>

Then create a [Release](/user-guides/workflow-user-guide/packages-and-releases.md#releases) including the [Package](/user-guides/workflow-user-guide/packages-and-releases.md#packages) we just imported. In our example, we invoke the package three times, each time with different arguments. In the first invocation, we provide `compute compute.toml` which tells the launcher script to run the compute binary and pass the compute.toml argument.

### Deploy Archive Package

<figure><img src="/files/Weypoar1J8wTCxZNHbVe" alt=""><figcaption></figcaption></figure>

We then deploy our package to a specified machine within one of our fleets. If you need additional configurations such as environment variables, you can define these within the *advanced options*.

### Save and Run Workflow

On the top right of the workflow graph, select *Create workflow*. This will save the new workflow and you can click on each individual step and see the  configurations. Click on *Run workflow* to push it into action.

## Conclusion

Running this workflow will dispatch your GitHub Actions workflow and deploy the uploaded artifact to your testbed. In our [example](https://github.com/chassyflow/cargo-workspace-example), we deploy a Rust application as part of a ZIP archive including a configuration file.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chassy.io/tutorials/deploy-an-archive-package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
