This repo is for cursor to do stuff in.
Repo root can have etc/, opt/, home/, etc. The workflow clones in the Actions workspace and copies each root dir’s contents into the same path on the system.
| Repo path | Deployed to |
|---|---|
etc/* |
/etc/ |
opt/* |
/opt/ |
home/* |
/home/ |
Add a root dir (e.g. home/) and put files in it; the workflow runs cp -r home/* into /home/. Only roots that exist in the repo are deployed.
- File:
.github/workflows/deploy-cursor-example-repo.yml - Triggers: Push to
mainwhenopt/**,etc/**,home/**, or the workflow file changes; or run manually (workflow_dispatch). - Runner:
self-hostedwith sudo. For each root (etc,opt,home), copies that dir’s contents into the same path, backs up existing targets, sets root ownership and permissions on copied items only. - Manual run: Optional branch, backup existing (yes/no), and confirm deployment.
- Put files under
etc/,opt/, orhome/(and addhome/at repo root if you want/homedeployed). - Commit and push to
main(or run the workflow manually). - Workflow deploys each root’s contents into
/etc,/opt,/homeon the self-hosted runner.