From c11ce119d4c8bfe1dc2920e8aa45d55e4b0fcca1 Mon Sep 17 00:00:00 2001 From: Boris Mann Date: Sun, 20 Sep 2026 10:51:16 -0700 Subject: [PATCH] Adding smtp url as a secret and sending from techops @ cosocial.ca --- .gitea/workflows/deploy.yml | 5 +++++ README.md | 3 +++ 2 files changed, 8 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 0ca0f1e..9120367 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -56,6 +56,11 @@ jobs: if [ -n "${{ vars.PDS_PRIMARY_COLOR }}" ]; then echo "pds_primary_color: \"${{ vars.PDS_PRIMARY_COLOR }}\"" >> vars/main.yml fi + # Optional: email/SMTP + if [ -n "${{ secrets.SMTP_URL }}" ]; then + echo "pds_email_smtp_url: ${{ secrets.SMTP_URL }}" >> vars/main.yml + fi + echo "pds_email_from_address: techops@cosocial.ca" >> vars/main.yml - name: Run playbook run: | diff --git a/README.md b/README.md index a837556..74e0aac 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,8 @@ Auto-deploys on push to `main`. Set up these in Gitea repo settings (Settings > | `PDS_SERVICE_NAME` | *(optional)* PDS display name for branding | | `PDS_PRIMARY_COLOR` | *(optional)* Primary color (hex) for branding | +Outgoing emails are sent from `techops@cosocial.ca` (fixed in the workflow). + **Secrets** (sensitive credentials): | Secret | Description | @@ -208,5 +210,6 @@ Auto-deploys on push to `main`. Set up these in Gitea repo settings (Settings > | `SSH_PRIVATE_KEY` | Private SSH key for the `sysadmin` user on the target server | | `OVH_S3_ACCESS_KEY` | OVH S3 access key for blob storage | | `OVH_S3_SECRET_KEY` | OVH S3 secret key for blob storage | +| `SMTP_URL` | *(optional)* SMTP URL with credentials (e.g., `smtps://user:pass@smtp.example.com/`) | The workflow installs Ansible, writes the SSH key from a secret, generates `inventory.yml` and `vars/main.yml` from vars and secrets, and runs the playbook.