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>
This commit is contained in:
parent
b570e4c7cf
commit
e77b2b8f12
6 changed files with 75 additions and 34 deletions
|
@ -1,7 +1,7 @@
|
||||||
.PHONY: deploy
|
.PHONY: deploy
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
@`nix-build --no-out-link`
|
@$(shell nix-build `git rev-parse --show-toplevel` -A 'users.glittershark."gws.fyi"' --no-out-link)
|
||||||
|
|
||||||
renew:
|
renew:
|
||||||
@echo Renewing...
|
@echo Renewing...
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
with import <nixpkgs> {};
|
args@{ pkgs, ... }:
|
||||||
|
with pkgs;
|
||||||
let
|
let
|
||||||
|
site = import ./site.nix args;
|
||||||
bucket = "s3://gws.fyi";
|
bucket = "s3://gws.fyi";
|
||||||
distributionID = "E2ST43JNBH8C64";
|
distributionID = "E2ST43JNBH8C64";
|
||||||
website =
|
website =
|
||||||
runCommand "gws.fyi" { } ''
|
runCommand "gws.fyi" { } ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp ${./index.html} $out/index.html
|
cp ${site.index} $out/index.html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in writeShellScript "deploy.sh" ''
|
in writeShellScript "deploy.sh" ''
|
||||||
${awscli}/bin/aws s3 sync ${website}/ ${bucket}
|
${awscli}/bin/aws s3 sync ${website}/ ${bucket}
|
||||||
${awscli}/bin/aws cloudfront create-invalidation \
|
${awscli}/bin/aws cloudfront create-invalidation \
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<meta name="description" content="Griffin has a website now">
|
|
||||||
<title>griffin smith</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
my name is griffin ward smith (aka grfn, glittershark, gws) and i'm a software
|
|
||||||
engineer and musician
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://github.com/glittershark/">github</a></li>
|
|
||||||
<li><a href="https://sacrosanct.bandcamp.com/">music</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
contact
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="mailto:root@gws.fyi">root@gws.fyi</a></li>
|
|
||||||
<li><a href="https://twitter.com/glittershark1">twitter</a></li>
|
|
||||||
<li><a href="https://keybase.io/glittershark">keybase</a></li>
|
|
||||||
<li>
|
|
||||||
<a href="http://keys.gnupg.net/pks/lookup?op=get&search=0x44EF5B5E861C09A7">
|
|
||||||
gpg key: 0F11A989879E8BBBFDC1E23644EF5B5E861C09A7
|
|
||||||
</a>
|
|
||||||
<br>
|
|
||||||
verify with keybase, if you don't trust this site's lack of SSL
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</body>
|
|
15
users/glittershark/gws.fyi/index.org
Normal file
15
users/glittershark/gws.fyi/index.org
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
my name is griffin ward smith (aka grfn, glittershark, gws) and i'm a software
|
||||||
|
engineer and musician
|
||||||
|
|
||||||
|
- [[https://github.com/glittershark/][github]]
|
||||||
|
- music
|
||||||
|
- https://sacrosanct.bandcamp.com/, a post-rock project with a [[https://bandcamp.com/h34rken][friend of mine]]
|
||||||
|
- [[https://soundcloud.com/missingggg][my current soundcloud]], releasing instrumental hip-hop under the name missing
|
||||||
|
|
||||||
|
contact
|
||||||
|
|
||||||
|
- [[mailto:web@gws.fyi][web@gws.fyi]]
|
||||||
|
- [[https://twitter.com/glittershark1][twitter]]
|
||||||
|
- https://keybase.io/glittershark
|
||||||
|
- glittershark on freenode
|
||||||
|
- [[http://keys.gnupg.net/pks/lookup?op=get&search=0x44EF5B5E861C09A7][gpg key: 0F11A989879E8BBBFDC1E23644EF5B5E861C09A7]]
|
45
users/glittershark/gws.fyi/orgExportHTML.nix
Normal file
45
users/glittershark/gws.fyi/orgExportHTML.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
emacs-nixpkgs =
|
||||||
|
(import <nixpkgs> {
|
||||||
|
overlays = [(import (builtins.fetchTarball {
|
||||||
|
url = "https://github.com/nix-community/emacs-overlay/archive/54afb061bdd12c61bbfcc13bad98b7a3aab7d8d3.tar.gz";
|
||||||
|
sha256 = "0hrbg65d5h0cb0nky7a46md7vlvhajq1hf0328l2f7ln9hznqz6j";
|
||||||
|
}))];
|
||||||
|
});
|
||||||
|
|
||||||
|
emacs = (emacs-nixpkgs.emacsPackagesFor emacs-nixpkgs.emacsUnstable)
|
||||||
|
.emacsWithPackages (p: with p; [
|
||||||
|
org
|
||||||
|
]);
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
src:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
outName =
|
||||||
|
let bn = builtins.baseNameOf src;
|
||||||
|
filename = elemAt (splitString "." bn) 0;
|
||||||
|
in filename + ".html";
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
runCommand outName {} ''
|
||||||
|
cp ${src} file.org
|
||||||
|
echo "${emacs}/bin/emacs --batch"
|
||||||
|
${emacs}/bin/emacs --batch \
|
||||||
|
--load ${./config.el} \
|
||||||
|
--visit file.org \
|
||||||
|
--eval "(progn
|
||||||
|
(require 'org)
|
||||||
|
(org-html-export-to-html))" \
|
||||||
|
--kill
|
||||||
|
cp file.html $out
|
||||||
|
''
|
9
users/glittershark/gws.fyi/site.nix
Normal file
9
users/glittershark/gws.fyi/site.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
args@{ pkgs, depot, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
orgExportHTML = import ./orgExportHTML.nix args;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
index = orgExportHTML ./index.org;
|
||||||
|
}
|
Loading…
Reference in a new issue