about summary refs log tree commit diff
path: root/users/glittershark/gws.fyi/default.nix
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-06-16T00·44-0400
committerglittershark <grfn@gws.fyi>2020-06-16T00·47+0000
commitef390b26eebeae2c454c4116edc1d6255eb7dcf3 (patch)
tree015378f29af84a62d08d49426cfe6c0b7b406c29 /users/glittershark/gws.fyi/default.nix
parent61e03e2d9992895aada33f76bf50d4d338d2cc02 (diff)
feat(gws.fyi): add current source of gws.fyi r/981
This will soon be replaced with a pile of org, but for now- HTML!

Change-Id: I54c15d5734fd3662ea4916553e0cd1b32cc0681f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/395
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users/glittershark/gws.fyi/default.nix')
-rw-r--r--users/glittershark/gws.fyi/default.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/users/glittershark/gws.fyi/default.nix b/users/glittershark/gws.fyi/default.nix
new file mode 100644
index 000000000000..6cf7c977e60b
--- /dev/null
+++ b/users/glittershark/gws.fyi/default.nix
@@ -0,0 +1,16 @@
+with import <nixpkgs> {};
+let
+  bucket = "s3://gws.fyi";
+  distributionID = "E2ST43JNBH8C64";
+  website =
+    runCommand "gws.fyi" { } ''
+      mkdir -p $out
+      cp ${./index.html} $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"
+''