Use the following steps to deploy Front End Hosting - Basic Static Site Generator (SSG) applications when Code Assembly is disabled in Cloud Platform:
Ensure that the commits in the branch contain a build artifact.
The build artifact is the output directory that is generated after running the npm install
and npm run build
commands.
Push the commits and deploy the code to an environment through the branch.
For example, if the master
branch is deployed to the Dev environment, commits including the ready-to-deploy built bundle are pushed to the master
branch, with no further npm
commands.
Use the following specifications when deploying SSG applications with Code Assembly disabled:
Specification | Value |
---|---|
Development branch | master |
Deployment branch | master |
What code is pushed | built bundle |
Who runs npm install , npm run build | Developer |
Enabling Code Assembly involves the following two branches:
Use the following steps to deploy SSG applications when Code Assembly is enabled in Cloud Platform:
Create a development branch for the development code.
Push the development code to the branch.
Code Assembly runs the npm install
and npm run build
commands, and creates a new CODE-ASSEMBLY-BUILD-<BRANCH_NAME>
branch with the build artifact.
Deploy the code to an environment through the new branch.
For example, if the master
branch is used for development, commits are pushed to the master
branch. Commits do not include a built bundle and only include the development code. Code Assembly builds the code and creates a new CODE-ASSEMBLY-BUILD-master
branch, which is used for deploying the code to an environment.
Commits to the development branch must include only the development code. If this branch includes the node_modules
folder, Code Assembly returns an error.
Use the following specifications when deploying SSG applications with Code Assembly enabled:
Specification | Value |
---|---|
Development branch | master |
Deployment branch | CODE-ASSEMBLY-BUILD-master |
What code is pushed | development code |
Who runs npm install , npm run build | Code Assembly |
As part of the code build/deployment process, several commands run in the background to produce a build artifact and deploy it to an environment. This process encompasses cloning/pushing code to a repository, running npm install
and npm run build
commands to generate the deployable bundle for an environment's branch (when Code Assembly is enabled), and deploying the application steps. The total time consumed for building is tracked as "build minutes."
A build can last up to 45 minutes. If it exceeds this duration, the build/deployment fails. By default, each application is allocated 10,000 build minutes per month. If a customer exceeds this limit, Code Assembly remains usable but your account manager is notified to contact the account holder for an entitlement upgrade. In overuse instances, account managers provide the necessary details to customers. Customers may also purchase additional build minutes as needed. For more information, contact your account manager. Build minutes include repo clone duration, npm install
, build time, and git push time.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Tue Oct 22 2024 12:20:00 GMT+0000 (Coordinated Universal Time)