tvl-depot/users/grfn/gws.fyi/default.nix
Griffin Smith 0faba1a268 refactor(gws.fyi): Remove cloudfront invalidation step
I'm not using cloudfront for gws.fyi anymore, so this invalidation step
on deploy is pointless

Change-Id: I153848666dc70acfc456b5dcf276bab2410c4716
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2946
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
2021-04-12 15:29:43 +00:00

28 lines
641 B
Nix

args@{ pkgs, ... }:
with pkgs;
let
site = import ./site.nix args;
resume = import ../resume args;
bucket = "s3://gws.fyi";
distributionID = "E2ST43JNBH8C64";
css = runCommand "main.css" {
buildInputs = [ pkgs.minify ];
} ''
minify --type css < ${./main.css} > $out
'';
website =
runCommand "gws.fyi" { } ''
mkdir -p $out
cp ${css} $out/main.css
cp ${site.index} $out/index.html
cp ${resume} $out/resume.pdf
'';
in (writeShellScript "deploy.sh" ''
${awscli}/bin/aws --profile personal s3 sync ${website}/ ${bucket}
echo "Deployed to http://gws.fyi"
'') // {
inherit website;
}