euchre-live

Euchre web-app for the socially distant family
git clone git://git.alexkarle.com/euchre-live.git
Log | Files | Refs | README | LICENSE

commit 8b88b117b6e1b785554705dc20b974cc0a60d46d (patch)
parent 9c8bce4014e843a157c575bda2442cd66dcdb22d
Author: Alex Karle <alex@karle.co>
Date:   Tue, 26 May 2020 21:13:40 -0400

ci: Add deploy stage to deploy to preprod

This leverages the secrets feature of builds.sr.ht (for which I have
added a SSH key and put its pair on the server) so that I can cut a
release on a push!

This is safe to run, as it (1) only tries to restart preprod and (2)
will fail if the server has players.

Diffstat:
M.build.yml | 6++++++
MMakefile | 9++++++---
2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/.build.yml b/.build.yml @@ -5,8 +5,11 @@ packages: - npm - rsync - cpanminus + - rsync sources: - https://git.sr.ht/~akarle/euchre-live +secrets: + - 923b614a-772e-472a-b9d5-e742fc0697c0 environment: PERL5LIB: /home/build/perl5/lib/perl5 tasks: @@ -20,3 +23,6 @@ tasks: - test: | cd euchre-live make test + - deploy: | + cd euchre-live + make release diff --git a/Makefile b/Makefile @@ -32,9 +32,12 @@ build: .public.ts $(LIB_FILES) gloat.pl .PHONY: release release: build test - git show HEAD --pretty=full -s | sed 's/\(Author\|Commit\): \([^<]\+\).*/\1: \2<redacted>/' > build/public/version.txt - rsync -av --delete build/ www@euchre.live:/var/www/preprod-el/ - ssh www@euchre.live env FORCE=$(FORCE) sh /var/www/restart.sh preprod + git show HEAD --pretty=full -s |\ + sed 's/\(Author\|Commit\): \([^<]\+\).*/\1: \2<redacted>/' > build/public/version.txt + rsync -av --delete --rsh="ssh -o StrictHostKeyChecking=no" \ + build/ www@euchre.live:/var/www/preprod-el/ + ssh -o StrictHostKeyChecking=no www@euchre.live \ + env FORCE=$(FORCE) sh /var/www/restart.sh preprod .PHONY: clean clean: