Prerequisites
- An Astro project hosted in a Git repository that Bitbucket can access.
- An Astro Deployment.
- A Deployment API token, Workspace API token, or Organization API token.
- Access to Bitbucket.
Single branch implementation
To automate code deploys to a Deployment using Bitbucket, complete the following setup in a Git-based repository that hosts an Astro project:-
Set the following environment variable as a Bitbucket pipeline variable:
ASTRO_API_TOKEN: The value for your Workspace or Organization API token.ASTRO_DEPLOYMENT_ID: Your Deployment ID.
-
Create a new YAML file in
bitbucket-pipelines.ymlat the root of the repository that includes the following configuration:bitbucket-pipelines.yml