diff options
author | Aspen Smith <root@gws.fyi> | 2023-11-06T15·41-0500 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-11-06T15·46+0000 |
commit | 1027754b866e9489b6db0ed18a5c736f128aadcc (patch) | |
tree | 46bf05b3e411d9b53807494363544db147f33bbf /users/grfn/web/default.nix | |
parent | f3dea2ffbc4255c64d01a80e2668b2060b676e9e (diff) |
refactor(users/grfn): Rename gws.fyi -> web r/6966
Change-Id: Icdee0caa3a053958750d4b81853dbc3eee5b193a Reviewed-on: https://cl.tvl.fyi/c/depot/+/9973 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: grfn <grfn@gws.fyi>
Diffstat (limited to 'users/grfn/web/default.nix')
-rw-r--r-- | users/grfn/web/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/users/grfn/web/default.nix b/users/grfn/web/default.nix new file mode 100644 index 000000000000..5ab3614d7902 --- /dev/null +++ b/users/grfn/web/default.nix @@ -0,0 +1,37 @@ +args@{ pkgs, depot, ... }: +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 + ''; + + keys = runCommand "ssh-keys" { } '' + touch $out + echo "${depot.users.grfn.keys.main}" >> $out + ''; + + website = + runCommand "gws.fyi" { } '' + mkdir -p $out + cp ${css} $out/main.css + cp ${site.index} $out/index.html + cp -r ${site.recipes} $out/recipes + cp ${resume} $out/resume.pdf + cp ${keys} $out/keys + ''; + +in +(writeShellScript "deploy.sh" '' + ${awscli2}/bin/aws --profile personal s3 sync ${website}/ ${bucket} + echo "Deployed to http://gws.fyi" +'') // { + inherit website site; +} |