Inside of your Astro project, you'll see the following folders and files:
.
โโโ infra
โย ย โโโ backend.tf
โย ย โโโ main.tf
โย ย โโโ provider.tf
โย ย โโโ variables.tf
โโโ public
โย ย โโโ CNAME
โย ย โโโ favicon.svg
โย ย โโโ images
โโโ src
โย ย โโโ components
โย ย โโโ layouts
โย ย โโโ pages
โย ย โโโ styles
โโโ astro.config.mjs
โโโ README.md
โโโ package.json
โโโ tsconfig.json
โโโ yarn.lock
Astro looks for .astro
or .md
files in the src/pages/
directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/
, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the public/
directory.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
yarn install |
Installs dependencies |
yarn dev |
Starts local dev server at localhost:4321 |
yarn build |
Build your production site to ./dist/ |
yarn preview |
Preview your build locally, before deploying |
yarn format |
Format code with Prettier |
yarn astro ... |
Run CLI commands like astro add , astro check |
yarn astro -- --help |
Get help using the Astro CLI |
This Terraform configuration allows you to:
- Provision a Cloudflare zone.
- Manage DNS records within the Cloudflare zone.
- Ensure consistency and reproducibility of infrastructure changes.
Validate Stage (On Pull Requests) In this stage, Terraform configurations are validated whenever a pull request is opened. This ensures that proposed changes adhere to Terraform best practices and do not introduce syntax errors.
Deploy Stage (On Master Branch) In this stage, Terraform configurations are applied to deploy infrastructure when changes are merged into the master branch. This ensures that the changes are automatically deployed to production-like environments.
Feel free to check Astro documentation.