Author:
Hash:
Timestamp:
+27 -0 +/-1 browse
Kevin Schoon [me@kevinschoon.com]
30054ff1e69be90b61d63e64426f98657e65fc9d
Mon, 06 Oct 2025 13:08:50 +0000 (2 hours ago)
1 | diff --git a/publish.sh b/publish.sh |
2 | new file mode 100755 |
3 | index 0000000..e2121bf |
4 | --- /dev/null |
5 | +++ b/publish.sh |
6 | @@ -0,0 +1,27 @@ |
7 | + #!/bin/sh |
8 | + # This is an automated deployment script for use in Ayllu from which this |
9 | + # website is hosted. |
10 | + set -x |
11 | + |
12 | + GENERATED_BRANCH="generated" |
13 | + |
14 | + if git status --porcelain | grep -q .; then |
15 | + echo "repository dirty, aborting" |
16 | + exit 1 |
17 | + fi |
18 | + |
19 | + if [ "$(git rev-parse --abbrev-ref HEAD)" -ne "main" ]; then |
20 | + echo "repository needs to be on the main branch" |
21 | + exit 1 |
22 | + fi |
23 | + |
24 | + git checkout "$GENERATED_BRANCH" -- |
25 | + git reset --hard main |
26 | + git clean -fd |
27 | + |
28 | + ./build.py |
29 | + |
30 | + git add -f gen |
31 | + git commit -m 'automated www update' |
32 | + |
33 | + git checkout main |