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.