Skip to content

The pnpm cli deploy Command

The deploy command can be used to deploy the Central CDN from a local machine, e.g. for development purposes. It is also run by the CICD GitHub workflow.

Main Steps

The main steps during the execution of the script are these:

  1. Some initial checks for prerequisites (AWS credentials, etc.) are performed.
  2. The 'origin config files' in the folder origin-config are validated. Their complete content - no matter if stage, prod or other - is stored in JSON format in /tmp/origin-config.json.
  3. The origin data, i.e. all existing entries that start with /<env_name>/sliceOrigins, is read from the Parameter Store and stored in a temporary JSON file.
  4. The tests are run.
  5. The actual deployment via cdk deploy is executed.

Some More Details

  • The CDK code uses the data that was collected by the deploy command to create the necessary AWS resources:
    • /tmp/origin-config.json is used for param access roles.
    • the temporary JSON file is used to set the right origins in the CloudFront distribution.