tvl-depot/users/glittershark/gws.fyi/default.nix
Griffin Smith e77b2b8f12 feat(gws.fyi): Build from org + integrate with readTree
Build from org via emacs --batch, and update all the top-level
definitions to make things work nicely with readTree.

Change-Id: If0ac49c1d264856392e29b9e7b155641d865525b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/400
Reviewed-by: glittershark <grfn@gws.fyi>
2020-06-16 02:34:22 +00:00

19 lines
482 B
Nix

args@{ pkgs, ... }:
with pkgs;
let
site = import ./site.nix args;
bucket = "s3://gws.fyi";
distributionID = "E2ST43JNBH8C64";
website =
runCommand "gws.fyi" { } ''
mkdir -p $out
cp ${site.index} $out/index.html
'';
in writeShellScript "deploy.sh" ''
${awscli}/bin/aws s3 sync ${website}/ ${bucket}
${awscli}/bin/aws cloudfront create-invalidation \
--distribution-id "${distributionID}" \
--paths "/*"
echo "Deployed to http://gws.fyi"
''