--- sidebar_position: 2 --- # CI/CD Pipeline All applications follow a single, consistent Gitea Actions pipeline. ## Flow ```mermaid sequenceDiagram participant J as Jarvis / Dev participant G as Gitea participant A as Actions Worker participant R as Zot Registry participant H as TrueNAS Host J->>G: git push main G->>A: Trigger workflow A->>A: pnpm/go build + test A->>R: docker push image A->>H: Deploy (restart container) H-->>J: ✅ Live ``` ## Workflow Template ```yaml # .gitea/workflows/build.yml name: Build and Deploy on: push: branches: [main] pull_request: branches: [main] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build run: make build # or go build / pnpm build - name: Test run: make test - name: Docker build & push if: github.ref == 'refs/heads/main' run: | docker build -t $ZOT_REGISTRY/$APP_NAME:$GITHUB_SHA . docker push $ZOT_REGISTRY/$APP_NAME:$GITHUB_SHA - name: Deploy if: github.ref == 'refs/heads/main' run: | ssh deploy@lego-cloud.eu "docker pull && docker restart $APP_NAME" ``` ## Gitea Actions Runners Runners need to be registered on the Gitea instance. See [Gitea Actions documentation](https://docs.gitea.com/usage/actions/quickstart) for setup.