79 words
1 minutes
Snippet: Deploy Astro Sites to a VPS with rsync
2026-10-20

Snippet: Deploy Astro Sites to a VPS with rsync#

Deploy blog:

# local
(cd ~/fuwari && pnpm build) && rsync -ahvzP -e 'ssh -p 2222' ~/fuwari/ username@1.2.3.4:~/astro/fuwari/

# vps
sudo rsync -ahvz --delete ~/astro/fuwari/dist/ /var/www/html/blog/

# NOTE
# change site variable in astro.config.mjs. This URL will be used when generating dist/site-map-index.xml
#
# export default defineConfig({
#   site: 'https://fuwari.vercel.app/', 
#

Deploy resume:

# local
npm run build
rsync -ahPvz -e 'ssh -p 2222' devscard/ usernamen@1.2.3.4:~/astro/devscard/

# vps
sudo rsync -ahvz --delete ~/astro/devscard/dist/ /var/www/html/job/
Snippet: Deploy Astro Sites to a VPS with rsync
https://blog.juyung.com/posts/en/2026/10/20-11/
Author
Jay Juyung
Published at
2026-10-20
License
CC BY