From a049c9cc6b11018e7fc497876ad0402965d87397 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 22 Jun 2024 16:07:12 +0200 Subject: add CD to fly --- justfile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'justfile') diff --git a/justfile b/justfile index 8b2922c..08f6b01 100755 --- a/justfile +++ b/justfile @@ -1,5 +1,8 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i "just --justfile" +#!/usr/bin/env nix-shell +#!nix-shell -i "just --justfile" + +docker-registry := "registry.fly.io/alanpearce-eu" +docker-tag := `date +%Y%m%d%H%M%S` default: @just --list --justfile {{ justfile() }} --unsorted @@ -27,6 +30,14 @@ dev: ci: build check-links +cd: + fly auth docker + nix-build -A docker-stream-amd64-linux | sh | gzip --fast | \ + skopeo copy --dest-precompute-digests \ + docker-archive:/dev/stdin \ + docker://{{ docker-registry }}:{{ docker-tag }} + fly deploy --image {{ docker-registry }}:{{ docker-tag }} + deploy-vercel-preview: build vercel pull --environment=preview vercel deploy -- cgit 1.4.1