Skip to content

Commit

Permalink
um
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Jun 26, 2024
1 parent 919e57a commit 30081b9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 57 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
name: sunsetglow
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build Nix
run: nix build -j8 .#devShells.x86_64-linux.build
run: nix build -j8 .#devShells.x86_64-linux.default
- name: Build Website
run: nix develop .#devShells.x86_64-linux.build --command make build
run: nix develop .#devShells.x86_64-linux.default --command make build
- name: Create Tarball
run: nix develop .#devShells.x86_64-linux.build --command bash -c '(cd dist/ && tar -czvf ../sunsetglow.tar.gz *)'
run: nix develop .#devShells.x86_64-linux.default --command bash -c '(cd dist/ && tar -czvf ../sunsetglow.tar.gz *)'
- name: Create release and upload tarball
id: upload
run: |
Expand Down Expand Up @@ -65,10 +65,10 @@ jobs:
name: sunsetglow
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build Nix
run: nix build -j8 .#devShells.x86_64-linux.deploy
run: nix build -j8 .#packages.x86_64-linux.levant
- name: Tailscale
uses: tailscale/github-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
- name: Deploy
run: nix develop .#devShells.x86_64-linux.deploy --command levant deploy -log-level=debug -var "artifact_source_url=$ARTIFACT_SOURCE_URL" deploy.nomad
run: nix run .#packages.x86_64-linux.levant deploy -log-level=debug -var "artifact_source_url=$ARTIFACT_SOURCE_URL" deploy.nomad
74 changes: 22 additions & 52 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,58 +43,28 @@
'';
in
{
devShells = {
build = pkgs.mkShell {
inherit shellHook;
buildInputs = [
(pkgs.buildEnv {
name = "sg-build";
paths = with pkgs; [
bashInteractive
coreutils
moreutils
findutils
curl
pandoc
py
tex
];
})
];
};
deploy = pkgs.mkShell {
inherit shellHook;
buildInputs = [
(pkgs.buildEnv {
name = "sg-deploy";
paths = with pkgs; [
bashInteractive
coreutils
moreutils
findutils
levant
];
})
];
};
default = pkgs.mkShell {
inherit shellHook;
buildInputs = [
(pkgs.buildEnv {
name = "sg-dev";
paths = with pkgs; [
bashInteractive
coreutils
moreutils
findutils
inotify-tools
pandoc
py
tex
];
})
];
};
packages = {
# For running during deployments.
levant = pkgs.levant;
};
devShells.default = pkgs.mkShell {
inherit shellHook;
buildInputs = [
(pkgs.buildEnv {
name = "sg-dev";
paths = with pkgs; [
bashInteractive
coreutils
moreutils
findutils
inotify-tools
curl
pandoc
py
tex
];
})
];
};
}
);
Expand Down
2 changes: 2 additions & 0 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def compile_feed(posts: PostIndex):
SubElement(feed, "id").text = "tag:sunsetglow.net,2024:site"

for slug, meta in posts.items():
if not meta.public:
continue
post = SubElement(feed, "entry")
SubElement(post, "id").text = f"tag:sunsetglow.net,{meta.timestamp.strftime('%Y-%m-%d')}:{slug}"
SubElement(post, "link", href=f"https://sunsetglow.net/posts/{slug}.html", type="text/html")
Expand Down

0 comments on commit 30081b9

Please sign in to comment.