~reesmichael1/chantpointer

0aba4781686ac3d33fffef2570d3e310b2d0d720 — Michael Rees 3 years ago e9e82d4
Fix .build.yml syntax
1 files changed, 10 insertions(+), 5 deletions(-)

M .build.yml
M .build.yml => .build.yml +10 -5
@@ 1,19 1,24 @@
image: alpine/latest
image: archlinux
packages:
    - go
    - rsync
sources:
    - https://git.sr.ht/~reesmichael1/chantpointer
environment:
    - deploy: chantpointer@104.248.101.90
    deploy: chantpointer@104.248.101.90
secrets:
    - d7ae6197-e2bd-42be-b9b1-5141cf17c01c
tasks:
    - test: |
        cd chantpointer
        go test
    - build: |
        cd chantpointer
        go build -o bin/server
    - deploy: |
        rsync -r bin $deploy:/home/chantpointer/deploy
        rsync -r static $deploy:/home/chantpointer/deploy
        rsync -r templates $deploy:/home/chantpointer/deploy
        cd chantpointer
        sshopts="ssh -o StrictHostKeyChecking=no"
        rsync --rsh="$sshopts" -r bin $deploy:/home/chantpointer/deploy
        rsync --rsh="$sshopts" -r static $deploy:/home/chantpointer/deploy
        rsync --rsh="$sshopts" -r templates $deploy:/home/chantpointer/deploy
        ssh $deploy "sudo systemctl restart server"