Upload assets to the CDN ΒΆ

This how-to guide shows you how to upload assets to the CDN.

Prerequisites ΒΆ

  • A GitHub repository that the team has access to.
  • The repository needs to have a GitHub workflow that builds the assets you want to upload.

Authorize repository for upload ΒΆ

  1. Open Nais console in your browser and select your team.
  2. Select the Repositories tab
  3. Input your repository (organization/repository) and press Add.

Upload assets with the CDN action ΒΆ

In your Github Workflow, add the following step to upload your assets to the CDN.

yaml

For more information on the inputs and outputs of the action, see the CDN Upload action reference.

Use the uploaded assets ΒΆ

The assets from the CDN will be available at:

Plaintext

and

Plaintext

CORS is automatically configured to accept GET from any origin (*).

🎯 Learn how to manage CDN assets