-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
80 lines (66 loc) · 2.15 KB
/
justfile
File metadata and controls
80 lines (66 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Micro.blog Development Tasks
# Load environment variables from .env file
set dotenv-load
# Default recipe (list available recipes)
default:
@just --list
# Build the Hugo site
build:
hugo
# Run Hugo development server
serve:
hugo server --disableFastRender --noHTTPCache
# Authenticate to Micro.blog via email
auth:
python3 .github/deploy/microblog_auth.py
# Deploy theme changes to Micro.blog
deploy:
python3 .github/deploy/microblog_deploy.py --all
# Backup content from Micro.blog
backup:
python3 .github/deploy/microblog_backup.py --all
# Backup and download only (no extraction)
backup-download:
python3 .github/deploy/microblog_backup.py --export-only
# Extract content from existing backup ZIP
backup-extract ZIP_FILE:
python3 .github/deploy/microblog_backup.py --extract-only {{ZIP_FILE}}
# Download the latest content export ZIP from the most recent GitHub release
release-download:
#!/usr/bin/env bash
set -euo pipefail
mkdir -p backups
echo "Fetching latest release from doughatcher/dotcom..."
gh release download --repo doughatcher/dotcom --pattern "*.zip" --dir backups --clobber
echo "Downloaded to backups/:"
ls -lh backups/*.zip | tail -5
# Validate session cookie
validate:
python3 .github/deploy/microblog_deploy.py --validate-only
# Configure git identity from .env file
git-config:
#!/usr/bin/env bash
set -euo pipefail
if [ -f .env ]; then
source .env
if [ -n "${GIT_USER_NAME:-}" ] && [ -n "${GIT_USER_EMAIL:-}" ]; then
git config user.name "$GIT_USER_NAME"
git config user.email "$GIT_USER_EMAIL"
echo "✅ Git identity configured:"
echo " Name: $(git config user.name)"
echo " Email: $(git config user.email)"
else
echo "❌ GIT_USER_NAME and GIT_USER_EMAIL must be set in .env file"
exit 1
fi
else
echo "❌ .env file not found"
exit 1
fi
# Install Python dependencies
install: git-config
pip3 install --user --break-system-packages requests python-dotenv
@echo "Installation complete."
# Show available commands
help:
just --list