- Documentation
Code Pipeline
Best practices
Deploy React via a pipeline to TOS object storage
Best practices
Deploy React via a pipeline to TOS object storage
Deploy React via a pipeline to TOS object storage
This article describes how to use the pipeline feature in Volcano Engine Code Pipeline (CP) to quickly deploy front-end applications to object storage TOS.
- The React application has been brought under management in the code repository. In this example, Gitee is used as the repository.
- The artifact repository workspace has been created. For details about operations, refer to create workspace.
Step 1: Create object storage
- Bucket policy: select Public read. Fill in other parameters based on your business requirements. For configuration details, refer to Create a bucket.
- Log in to the created storage bucket, then go to basic configuration -> Create static network rules in the Static Network module. For details about Actions, refer to Setting up a static website.
- In Domain and Transfer -> Custom Domain Name, bind an ICP filed domain name to the bucket. For action details, refer to Set custom domain name.
Step 2: Create a pipeline
- In the already created Code Pipeline workspace, create a code source and bring the React application code under management. For details about actions, refer to Create code source.
- Create a blank template pipeline.
- In the code source & trigger area, click Add -> Code Source. Add a managed code source.
- Select the second pipeline node and reference the NodeJS compile and build task template.
- In the Step area, click add -> artifact -> TOS upload.
- Configure TOS upload parameters. For a detailed configuration description, refer to TOS upload.
- After modifications are complete, click Save, to finish creating,
Step 3: Run the pipeline
- On the pipeline details page, click Execute now.
In the TOS console, under the specified directory of a created bucket, view the uploaded files.
Access React static pages
After deployment is complete, you can access the React static page through a custom domain name that has been registered and filed.
- In the TOS console, view uploaded files in the specified directory of an already created bucket.
- Obtain the custom domain name for static pages from the custom domain name list.
- In the browser, enter custom domain + site address, and the React page will be displayed. For example https://cp-test-demo-*****/index.html.
Last updated: 2025.09.10 17:37:25