CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
deploy.yml
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| e1309d5 | 1 | name: Deploy gluecron to itself |
| 2 | # This is gluecron's first self-hosted workflow. When pushed to gluecron.com's | |
| 3 | # git endpoint, gluecron's own workflow runner picks this up and runs it. | |
| 4 | # Replaces the GitHub Action `vultr-deploy.yml` step for step. | |
| 5 | # | |
| 6 | # Trigger: every push to main. | |
| 7 | # Effect: pulls latest, runs the production deploy script, smoke-tests. | |
| 8 | ||
| 9 | on: | |
| 10 | push: | |
| 11 | branches: [main] | |
| 12 | ||
| 13 | jobs: | |
| 14 | deploy: | |
| 15 | runs-on: self | |
| 16 | steps: | |
| 17 | - name: Pull latest main onto the box | |
| 18 | run: | | |
| 19 | cd /opt/gluecron | |
| 20 | git fetch --prune origin main | |
| 21 | git reset --hard origin/main | |
| 22 | echo "Deploying SHA: $(git rev-parse HEAD)" | |
| 23 | ||
| 24 | - name: Run production deploy script | |
| 25 | run: bash /opt/gluecron/scripts/deploy-crontech.sh | |
| 26 | ||
| 27 | - name: Smoke test | |
| 28 | run: | | |
| 29 | for i in 1 2 3 4 5 6 7 8; do | |
| 5d82f61 | 30 | code=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3010/healthz) |
| e1309d5 | 31 | echo "Attempt $i: /healthz -> $code" |
| 32 | if [ "$code" = "200" ]; then | |
| 33 | echo "OK" | |
| 34 | exit 0 | |
| 35 | fi | |
| 36 | sleep 8 | |
| 37 | done | |
| 38 | echo "Smoke failed" | |
| 39 | exit 1 |