Overview
This chapter provides detailed deployment steps to help you publish your project to the Pages platform smoothly. Whether you are a beginner or an experienced developer, this guide covers various stages from environment configuration to actual deployment. Following these guidelines, you can efficiently manage project deployment and ensure its stability and availability in a production environment.
Note:
For any new deployment, Pages will automatically create a new and unique URL, and you can use this URL to preview the latest changes of the project.
Deployment Lifecycle
The deployment lifecycle includes stages from development to production:
Local development: You can write code based on your own development habit. It is advisable to pull the latest env file every time before development to ensure use of the latest environment variable.
Submit and push: After task completion, you can push code to the connected Git repository's development branch. Each push will automatically trigger a deployment.
Preview: After successful deployment, Pages will allocate an appropriate domain name for the deployment. You can generate an access link with a validity of three hours through the preview button.
Production: After completing the development cycle, you will eventually merge or commit changes to the production branch (typically main). Pages will re-execute the build and deployment process. Upon completion, your deployment will be automatically assigned a deployment domain name, including any custom domain names you added.
Invalid: When successful deployment records exceed three, Pages will retain build artifacts of the first three deployments in chronological order and mark other successful status deployment records as invalid. Meanwhile, failed deployments will return a 401 status code. You can use the redeploy feature to create a new deployment with the configuration of the failed deployment, thereby restoring access to the failed deployment.
