diff --git a/AGENTS.md b/AGENTS.md index 5576a38..8f3e0c1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -84,6 +84,12 @@ src/ - Deployment is triggered automatically by gitea workflow `.gitea/workflows/deploy.yml`setup in the repository. +``` +.gitea/ +└── workflows/ + └── deploy.yml +``` + ## Known Issues & Gotchas 1. **React Router v8 routing:** Use `...`, NOT `}>` with nested routes — the latter doesn't pass `children` correctly diff --git a/README.md b/README.md index efe84ce..8e96af2 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,10 @@ In a VPS server, create the deployment user ```bash sudo adduser gitea-deployer -sudo install -d -m 700 -o deploy -g deploy /home/gitea-deployer/.ssh +sudo usermod -aG docker gitea-deployer +# test user can run docker +sudo -u gitea-deployer docker ps +sudo install -d -m 700 -o gitea-deployer -g gitea-deployer /home/gitea-deployer/.ssh ``` Because no ssh-copy-id is available on Windows, you need to copy the public key to the server manually. @@ -59,4 +62,11 @@ Test ssh connected with a private key ssh gitea-deployer@112.213.91.239 -p 2212 -i "$HOME\.ssh\gitea_deploy_key" -o IdentitiesOnly=yes ``` +Get content of private key + +```powershell +Get-Content -Raw "$HOME\.ssh\gitea_deploy_key" +``` + +In Gitea, create action secrets `DEPLOY_HOST`, `DEPLOY_SSH_PORT`, `DEPLOY_USER`, `DEPLOY_SSH_PRIVATE_KEY` for deployment.