Git hosting and a container registry in one Rust binary (axum + Astro)
| 1 | #!/bin/sh |
| 2 | # Deploys to production with ./deploy.sh when main is pushed to git.hygo.ai, |
| 3 | # before the push goes out: if the deploy fails, the push is stopped, so the |
| 4 | # repository never claims something production is not running. |
| 5 | # |
| 6 | # Enabled per clone with: git config core.hooksPath .githooks |
| 7 | # Skip once with: git push --no-verify (or SKIP_DEPLOY=1 git push) |
| 8 | |
| 9 | |
| 10 | url="" |
| 11 | [ && |
| 12 | case "" in |
| 13 | *git.hygo.ai/huncholane/irongit*) ;; |
| 14 | *) ;; |
| 15 | esac |
| 16 | |
| 17 | zero=0000000000000000000000000000000000000000 |
| 18 | deploy=0 |
| 19 | while ; do |
| 20 | [ || continue |
| 21 | [ && continue # deleting main is not a deploy |
| 22 | if [; then |
| 23 | |
| 24 | |
| 25 | |
| 26 | fi |
| 27 | deploy=1 |
| 28 | done |
| 29 | [ || |
| 30 | |
| 31 | # The image is built from this folder, not the commit: refuse anything that |
| 32 | # is not committed (untracked files included) so prod matches main exactly. |
| 33 | if [; then |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | fi |
| 39 | |
| 40 | |
| 41 |