> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nuon.co/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Actions

> Automatically update your Apps from GitHub Actions.

You can use GitHub Actions to automatically build and release your Components as part of your workflow. This can be used
to update your Nuon Apps, running in customer accounts alongside updating other platforms.

We offer the following Actions:

* [Build](https://github.com/nuonco/actions-build)
* [Release](https://github.com/nuonco/actions-release)

Each GitHub action uses the [Nuon CLI](/cli) to perform operations. Please refer to [configuration](#configuration)
for details on configuring each action.

## Automatically Build Components

In order to update customer applications with the latest version of a Component, it must be built first. You can
automatically build a component using GitHub Actions.

To automatically build from an Action:

```yaml theme={null}
---
on:
  push:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest
    name: Build
    steps:
      - name: Checkout code
        id: checkout
        uses: actions/checkout@v2

      - name: Build component
        id: build
        uses: nuonco/actions-build@v1
        with:
          api_token: ${{ secrets.nuon_api_token }}
          org: ${{ vars.nuon_org_id }}
          component_id: backend
```

## Configuration

Both an API token and an org ID are required to configure Nuon GitHub Actions.

It is recommended to set the API token using a [GitHub Action secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).

<Note>
  If you do not yet have an org setup, please follow the [quickstart guide](/get-started/quickstart).
</Note>

## API Tokens

If you are just trying out the Nuon Github Actions, then you can get started using your personal auth token:

```sh theme={null}
nuon orgs api-token
```

For real use cases, we recommend using a static token. To request a static token, please [contact
us](https://nuon.co/contact-us).
