Files
publish/deploy/README.md
voson 54109dd5b2
Some checks failed
deploy / build-and-deploy (push) Has been cancelled
init: astro publish site with newsletter, search, and actions workflow
2026-02-03 10:49:10 +08:00

716 B

Server deploy (static)

This repo builds an Astro static site into dist/ and deploys it to a Linux server via rsync over SSH.

One-time server setup

  1. Create a deploy directory, e.g. /var/www/publish.
  2. Configure your web server (Caddy or Nginx) to serve that directory.
  3. Create an SSH key for CI and add its public key to the server.

Gitea Actions secrets (repo settings)

  • SITE_URL
  • PUBLIC_NEWSLETTER_ACTION
  • PUBLIC_NEWSLETTER_EMAIL_FIELD
  • PUBLIC_NEWSLETTER_TITLE (optional)
  • PUBLIC_NEWSLETTER_DESCRIPTION (optional)
  • DEPLOY_SSH_HOST
  • DEPLOY_SSH_PORT
  • DEPLOY_SSH_USER
  • DEPLOY_PATH
  • DEPLOY_SSH_KEY (private key)

Example Caddyfile

See deploy/Caddyfile.example.