diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e485b918..422af4d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,6 +176,44 @@ jobs: with: scandir: tests/e2e + canvas-deploy-reminder: + name: Canvas Deploy Reminder + runs-on: ubuntu-latest + needs: canvas-build + # Only fires on direct pushes to main (i.e. after a PR merges). + # PRs get canvas-build CI but no reminder — no deployment happens on PRs. + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + permissions: + # Required to post commit comments via the GitHub API. + contents: write + steps: + - name: Post deploy reminder as commit comment + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_SHA: ${{ github.sha }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + run: | + # Write body to a temp file — avoids backtick escaping in shell. + cat > /tmp/deploy-reminder.md << 'BODY' + ## Canvas build passed ✅ — deploy required + + The canvas container is **not auto-deployed**. Merged canvas changes are invisible until the host container is rebuilt. + + Run this on the host machine to apply: + ```bash + cd /g/personal_programs/molecule-monorepo + git pull origin main + docker compose build canvas && docker compose up -d canvas + ``` + BODY + printf '\n> Posted automatically by CI · commit `%s` · [build log](%s)\n' \ + "$COMMIT_SHA" "$RUN_URL" >> /tmp/deploy-reminder.md + + gh api \ + --method POST \ + "repos/${{ github.repository }}/commits/${{ github.sha }}/comments" \ + --field "body=@/tmp/deploy-reminder.md" + python-lint: name: Python Lint & Test runs-on: ubuntu-latest