Astro for personal website
I am going to rewrite this website using Astro and documenting steps
I will bootrap this website under subdomain https://astro.gregko.com
Creating new project is pretty straightforward astro cli is awesome
yarn create astro
I have added subdomain to my existing vercel project and updated DNS records with my domain provider.
Then I will point to this script below in project settings and build conditionally based on a branch. I will also need to change a type of a project to Other
because it is no longer just NextJS
#!/bin/bash
if [[ $VERCEL_GIT_COMMIT_REF == "astro" ]]; then
# mad magnitude is randomly generate project name
npx astro build --root mad-magnitude
cp -r ./mad-magnitude/dist ./dist
else
npx next build
# static export kills all api routes
npx next export -o dist
fi