Deployment
This guide describes how to deploy your app on your live domain. The setup consists of three parts.
- Register the app in your plentysystems system. Registering the app generates authentication credentials.
- Add the credentials to your GitHub repository.
- Upload the app to plentysystems.
The following sections describe the steps in detail.
plentysystems system
- Log into your plentysystems system.
- Go to CMS » Deployment.
- Click on ➕ to add a new application.
- Fill in the required information.
- Create the application.
Creating the application adds a new table entry. In the next part, you'll need the Access key.
GitHub
Repository fork
Create a fork of the PWA repository.
Authentication
- Go to your repository.
- Go to Settings.
- In the Security section, go to Secrets and variables » Actions.
- Click on New repository secret.
- Fill in the information according to the table below.
Name | Value |
---|---|
URL_ENDPOINT_TOKEN | Access key |
System URL
- Go to your repository.
- Go to Settings.
- In the Security section, go to Secrets and variables » Actions.
- Open the Variables tab.
- Click on New repository variable.
- Fill in the information according to the table below.
Name | Value |
---|---|
API_URL | Your shop domain |
API security token
- Go to your repository.
- Go to Settings.
- In the Security section, go to Secrets and variables » Actions.
- Click on New repository secret.
- Fill in the information according to the table below.
Name | Value |
---|---|
API_SECURITY_TOKEN | Your secret api token |
For additional details, refer to the following guide:
Config
When running the shop locally, the app utilises values from apps/web/.env
to enable features and settings, which are then read by the Nuxt configuration. Since we're ignoring .env files on deployment, the values from apps/web/.env need to be provided as an Action GitHub variable CONFIG
to be used in the upload action.
- Go to your repository.
- Go to Settings.
- In the Security section, go to Secrets and variables » Actions.
- Open the Variables tab.
- Click on New repository variable.
- Fill in the information from your apps/web/.env file based on apps/web/.env.example, example in the table below.
Name | Value |
---|---|
Config | TURNSTILESITEKEY="0x4AAAAAAANx3aXDh7UR35x0" NEWSLETTERFORMNAMES=true USE_WEBP=0 VALIDATE_RETURN_REASONS=1 |
Upload
In your forked repository, enable the GitHub Action Deploy PWA
from upload.yml
. Update the trigger conditions to determine when to upload your repository to your plentysystems system.
To deploy a preview to your plentysystems system, carry out the following steps:
- Go to your repository.
- Go to Actions.
- In the All workflows sections, click on Deploy PWA.
- Open the Run workflow drop-down menu.
- In the field The tag version, branch name or SHA to checkout, enter the name of the branch you want to deploy.
- Click on Run workflow.
The workflow takes several minutes to complete. You can monitor the progress in the Actions menu.
Activation
- Log into your plentysystems system.
- Go to CMS » Deployment.
- For the configured domain, open the further actions menu (three dots).
- Click on Activate application.
The activation makes the application reachable on the configured domain. It can take up to 1 hour for the changes to take effect.
Preview
- Log into your plentysystems system.
- Go to CMS » Deployment.
- Click on the URL of the app you want to preview.
Live
INFO
📓 To activate live mode, you first have to activate the application.
- Log into your plentysystems system.
- Go to CMS » Deployment.
- For the configuration domain, open the further actions menu (three dots).
- Click on Activate live mode.