init: astro publish site with newsletter, search, and actions workflow
Some checks failed
deploy / build-and-deploy (push) Has been cancelled

This commit is contained in:
voson
2026-02-03 10:49:10 +08:00
commit 54109dd5b2
45 changed files with 10452 additions and 0 deletions

26
deploy/README.md Normal file
View File

@@ -0,0 +1,26 @@
# 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`.