commit 348c55b09bbbf00df0aea95dee2d9c5d1196732d Author: PedroEdiaz Date: Wed Mar 11 01:49:21 2026 -0600 CI: Add template diff --git a/.gitea/CODEOWNERS b/.gitea/CODEOWNERS new file mode 100644 index 0000000..ecb7c21 --- /dev/null +++ b/.gitea/CODEOWNERS @@ -0,0 +1,3 @@ +.woodpecker.{yml,yaml} @https/CI +.gitea/CODEOWNERS @https/CI +README.md @https/CI diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..7118123 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,23 @@ +steps: + publish: + image: alpine:latest + commands: + - apk add --no-cache rsync openssh-client + + - echo -e "$CI_REPO_NAME {\n\timport _https_generic\n\t file_server {\n\t\t root /usr/https/$CI_REPO_NAME/public\n\t }\n }" > ./$CI_REPO_NAME.conf + + - mkdir -p ~/.ssh + - echo "$HTTPS_SSH_KEY" > ~/.ssh/id_ed25519 + - chmod 600 ~/.ssh/id_ed25519 + - ssh-keyscan -H nviam.dev >> ~/.ssh/known_hosts 2>/dev/null + + - rsync -av --delete ./public https@nviam.dev:$CI_REPO_NAME + - rsync -av --delete ./$CI_REPO_NAME.conf https@nviam.dev:caddy + + environment: + HTTPS_SSH_KEY: + from_secret: https_ssh_key + + when: + event: push + branch: main diff --git a/README.md b/README.md new file mode 100644 index 0000000..6721f55 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Contributing + +## Branch Protection +- **`main` branch is protected** — direct pushes are disabled. +- All changes must go through **Merge Requests (MRs)**. +- MRs require approval from code owners before merging. + +## CI/CD +- Deployment is automated via **Woodpecker CI**. +- Pipeline triggers on every push to `main` after merge. +- Configuration: `.woodpecker.yml` + +## Workflow +1. Create a feature branch from `main` +2. Make changes and push (put web content in `/public`) +3. Open a Merge Request +4. Wait for CI checks + code owner review +5. Merge when approved + +## Code Owners +See `.gitea/CODEOWNERS` for responsible maintainers.