Commit
Author: Kevin Schoon [me@kevinschoon.com]
Hash: 5bfd82bb429abccf33cf8aa42465f1e5f286c159
Timestamp: Thu, 30 Jan 2025 08:22:27 +0000 (3 weeks ago)

+29 -5 +/-4 browse
deployment updates, misc
1diff --git a/README.md b/README.md
2index 9d0fdc8..3ef3682 100644
3--- a/README.md
4+++ b/README.md
5 @@ -4,4 +4,6 @@ This is source code for my personal website.
6
7 # Development
8
9+ Install [minify-html](https://github.com/wilsonzlin/minify-html).
10+
11 scripts/watch.sh ./build.py
12 diff --git a/build.py b/build.py
13index e424c55..84292aa 100755
14--- a/build.py
15+++ b/build.py
16 @@ -27,7 +27,7 @@ def _render_rule(w: ninja_syntax.Writer, name, link):
17 "-link",
18 link,
19 "-content",
20- _nth(2) + "| htmlmin > $out",
21+ _nth(2) + "| minhtml > $out",
22 ]
23 ),
24 )
25 diff --git a/content/projects/air-quality-torino/README.md b/content/projects/air-quality-torino/README.md
26index abcfb8c..39a79cc 100644
27--- a/content/projects/air-quality-torino/README.md
28+++ b/content/projects/air-quality-torino/README.md
29 @@ -8,10 +8,7 @@ the Alps. [1](#ref) [2](#ref) [3](#ref)
30 ## Real Time Data
31
32 Below is real time data that is collected from an [Air Gradient](https://www.airgradient.com/)
33- air quality monitor. It is positioned outside my apartment in the Vanchiglietta
34- neighborhood of Torino, Italy.
35-
36- <iframe width="425" height="350" src="https://www.openstreetmap.org/export/embed.html?bbox=7.695815563201904%2C45.05788017528605%2C7.731091976165772%2C45.086717679634475&amp;layer=mapnik" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/#map=16/45.07230/7.71345">View Larger Map</a></small>
37+ air quality monitor.
38
39 ### Particulate Matter
40
41 diff --git a/scripts/publish.sh b/scripts/publish.sh
42new file mode 100755
43index 0000000..b72b977
44--- /dev/null
45+++ b/scripts/publish.sh
46 @@ -0,0 +1,25 @@
47+ #!/bin/sh
48+ set -x
49+
50+ GENERATED_BRANCH="generated"
51+
52+ if git status --porcelain | grep -q .; then
53+ echo "repository dirty, aborting"
54+ exit 1
55+ fi
56+
57+ if [ "$(git rev-parse --abbrev-ref HEAD)" -ne "main" ]; then
58+ echo "repository needs to be on the main branch"
59+ exit 1
60+ fi
61+
62+ git checkout "$GENERATED_BRANCH" --
63+ git reset --hard main
64+ git clean -fd
65+
66+ ./build.py
67+
68+ git add -f gen
69+ git commit -m 'automated www update'
70+
71+ git checkout main