Commit c5ddea05b5
c5ddea05b5421a0abd549406f300dc5e3968e3c5
parent: afc13ea6b9
Verified · cmc
cmc <hello@cleberg.net> · 2026-03-23 15:48 UTC
publish Domain Dig link
Layout: unified · split
.builds/deploy.yml
added
+34
| @@ -0,0 +1,34 @@ |
| |
1 | image: debian/bookworm |
| |
2 | |
| |
3 | packages: |
| |
4 | - emacs-nox |
| |
5 | - python3 |
| |
6 | - python3-pip |
| |
7 | - rsync |
| |
8 | - openssh-client |
| |
9 | |
| |
10 | sources: |
| |
11 | - https://git.sr.ht/~ccleberg/cleberg.net |
| |
12 | |
| |
13 | secrets: |
| |
14 | - <ssh-deploy-key-uuid> # ~/.ssh/id_rsa, has write access to server |
| |
15 | |
| |
16 | environment: |
| |
17 | ENV: prod |
| |
18 | BUILD: "true" |
| |
19 | |
| |
20 | tasks: |
| |
21 | - setup: | |
| |
22 | pip install --break-system-packages uv |
| |
23 | curl -sSfL https://github.com/tdewolff/minify/releases/latest/download/minify_linux_amd64.tar.gz \ |
| |
24 | | tar -xz -C ~/.local/bin minify |
| |
25 | - build: | |
| |
26 | cd cleberg.net |
| |
27 | uv run build.py |
| |
28 | - deploy: | |
| |
29 | cd cleberg.net |
| |
30 | chmod 600 ~/.ssh/id_rsa |
| |
31 | rsync -r --delete-before \ |
| |
32 | -e "ssh -o StrictHostKeyChecking=no" \ |
| |
33 | .build/ \ |
| |
34 | homelab:/var/www/cleberg.net/ |
.github/dependabot.yml
deleted
−6
| @@ -1,6 +0,0 @@ |
| 1 | version: 2 |
| |
| 2 | updates: |
| |
| 3 | - package-ecosystem: "uv" |
| |
| 4 | directory: "/" |
| |
| 5 | schedule: |
| |
| 6 | interval: "weekly" |
| |
.github/workflows/codeql.yml
deleted
−46
| @@ -1,46 +0,0 @@ |
| 1 | name: "CodeQL Advanced" |
| |
| 2 | |
| |
| 3 | on: |
| |
| 4 | push: |
| |
| 5 | branches: [ "main" ] |
| |
| 6 | pull_request: |
| |
| 7 | branches: [ "main" ] |
| |
| 8 | |
| |
| 9 | jobs: |
| |
| 10 | analyze: |
| |
| 11 | name: Analyze (${{ matrix.language }}) |
| |
| 12 | runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
| |
| 13 | permissions: |
| |
| 14 | security-events: write |
| |
| 15 | packages: read |
| |
| 16 | actions: read |
| |
| 17 | contents: read |
| |
| 18 | |
| |
| 19 | strategy: |
| |
| 20 | fail-fast: false |
| |
| 21 | matrix: |
| |
| 22 | include: |
| |
| 23 | - language: python |
| |
| 24 | build-mode: none |
| |
| 25 | steps: |
| |
| 26 | - name: Checkout repository |
| |
| 27 | uses: actions/checkout@v4 |
| |
| 28 | - name: Initialize CodeQL |
| |
| 29 | uses: github/codeql-action/init@v4 |
| |
| 30 | with: |
| |
| 31 | languages: ${{ matrix.language }} |
| |
| 32 | build-mode: ${{ matrix.build-mode }} |
| |
| 33 | - if: matrix.build-mode == 'manual' |
| |
| 34 | shell: bash |
| |
| 35 | run: | |
| |
| 36 | echo 'If you are using a "manual" build mode for one or more of the' \ |
| |
| 37 | 'languages you are analyzing, replace this with the commands to build' \ |
| |
| 38 | 'your code, for example:' |
| |
| 39 | echo ' make bootstrap' |
| |
| 40 | echo ' make release' |
| |
| 41 | exit 1 |
| |
| 42 | |
| |
| 43 | - name: Perform CodeQL Analysis |
| |
| 44 | uses: github/codeql-action/analyze@v4 |
| |
| 45 | with: |
| |
| 46 | category: "/language:${{matrix.language}}" |
| |
build.py
+11
| @@ -34,6 +34,16 @@ from datetime import datetime |
| 34 | from pathlib import Path |
34 | from pathlib import Path |
| 35 | |
35 | |
| 36 | |
36 | |
| |
37 | def run_ruff(): |
| |
38 | print("Running ruff...") |
| |
39 | for cmd in [["ruff", "check", "--fix"], ["ruff", "format"]]: |
| |
40 | result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) |
| |
41 | if result.returncode != 0: |
| |
42 | print(f"ruff error ({' '.join(cmd)}):") |
| |
43 | print(result.stderr, file=sys.stderr) |
| |
44 | sys.exit(1) |
| |
45 | |
| |
46 | |
| 37 | def update_index_html(html_snippet, template_path="./.build/index.html"): |
47 | def update_index_html(html_snippet, template_path="./.build/index.html"): |
| 38 | """ |
48 | """ |
| 39 | Read the index.html file at `template_path`, replace everything between |
49 | Read the index.html file at `template_path`, replace everything between |
| @@ -558,6 +568,7 @@ def start_dev_server(build_dir): |
| 558 | |
568 | |
| 559 | |
569 | |
| 560 | def main(): |
570 | def main(): |
| |
571 | run_ruff() |
| 561 | html_snippet = get_recent_posts_html("./content/blog", num_posts=3) |
572 | html_snippet = get_recent_posts_html("./content/blog", num_posts=3) |
| 562 | |
573 | |
| 563 | build_dir = Path(".build") |
574 | build_dir = Path(".build") |