Commit e22aa788a5
e22aa788a5da78f62e9b25c666a6701582812856
parent: c5ddea05b5
Verified · cmc
cmc <hello@cleberg.net> · 2026-03-23 15:52 UTC
migrate ci to sourcehut; add ruff to build.py
Layout: unified · split
.builds/deploy.yml → .build.yml
renamed
+1 −1
| @@ -11,7 +11,7 @@ sources: |
| 11 | 11 | - https://git.sr.ht/~ccleberg/cleberg.net |
| 12 | 12 | |
| 13 | 13 | secrets: |
| 14 | | - <ssh-deploy-key-uuid> # ~/.ssh/id_rsa, has write access to server |
| 14 | - 303fbd30-2970-4d18-b88b-0f6abf822ea5 |
| 15 | 15 | |
| 16 | 16 | environment: |
| 17 | 17 | ENV: prod |
.github/workflows/deploy.yml
deleted
−68
| @@ -1,68 +0,0 @@ |
| 1 | | name: Build and Deploy |
| 2 | | |
| 3 | | on: |
| 4 | | push: |
| 5 | | branches: |
| 6 | | - main |
| 7 | | paths-ignore: |
| 8 | | - '.github/**' |
| 9 | | - 'screenshots/**' |
| 10 | | - 'utils/**' |
| 11 | | - 'LICENSE' |
| 12 | | - 'README.org' |
| 13 | | |
| 14 | | jobs: |
| 15 | | build-job: |
| 16 | | runs-on: ubuntu-latest |
| 17 | | container: |
| 18 | | image: ghcr.io/ccleberg/cleberg.net:main |
| 19 | | |
| 20 | | steps: |
| 21 | | - name: Checkout code |
| 22 | | uses: actions/checkout@v6 |
| 23 | | |
| 24 | | - name: Run Build |
| 25 | | env: |
| 26 | | ENV: "prod" |
| 27 | | BUILD: "true" |
| 28 | | DEPLOY: "false" |
| 29 | | run: | |
| 30 | | echo "Environment is ready. Running build..." |
| 31 | | uv run build.py |
| 32 | | |
| 33 | | - name: Upload Build Artifacts |
| 34 | | uses: actions/upload-artifact@v6 |
| 35 | | with: |
| 36 | | name: build-output |
| 37 | | path: ${{ github.workspace }}/.build/ |
| 38 | | include-hidden-files: true |
| 39 | | |
| 40 | | deploy-job: |
| 41 | | runs-on: ubuntu-latest |
| 42 | | needs: build-job |
| 43 | | environment: production |
| 44 | | container: |
| 45 | | image: ghcr.io/ccleberg/cleberg.net:main |
| 46 | | |
| 47 | | steps: |
| 48 | | - name: Checkout code |
| 49 | | uses: actions/checkout@v6 |
| 50 | | |
| 51 | | - name: Download Build Artifacts |
| 52 | | uses: actions/download-artifact@v6 |
| 53 | | with: |
| 54 | | name: build-output |
| 55 | | path: ${{ github.workspace }}/.build/ |
| 56 | | |
| 57 | | - name: Setup SSH and Deploy |
| 58 | | env: |
| 59 | | SERVER_IP: ${{ secrets.SERVER_IP }} |
| 60 | | SERVER_USER: ${{ secrets.SERVER_USER }} |
| 61 | | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} |
| 62 | | run: | |
| 63 | | eval $(ssh-agent -s) |
| 64 | | echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - |
| 65 | | rsync -avz --delete \ |
| 66 | | -e "ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \ |
| 67 | | .build/ \ |
| 68 | | $SERVER_USER@$SERVER_IP:/var/www/cleberg.net/ |
.github/workflows/docker-build.yml
deleted
−41
| @@ -1,41 +0,0 @@ |
| 1 | | name: Build and Push Docker Image |
| 2 | | |
| 3 | | on: |
| 4 | | push: |
| 5 | | branches: [ "main" ] |
| 6 | | paths: |
| 7 | | - 'Dockerfile' |
| 8 | | - 'requirements.txt' |
| 9 | | - '.github/workflows/docker-build.yml' |
| 10 | | |
| 11 | | jobs: |
| 12 | | build: |
| 13 | | runs-on: ubuntu-latest |
| 14 | | permissions: |
| 15 | | contents: read |
| 16 | | packages: write |
| 17 | | |
| 18 | | steps: |
| 19 | | - name: Checkout repository |
| 20 | | uses: actions/checkout@v4 |
| 21 | | |
| 22 | | - name: Log in to GHCR |
| 23 | | uses: docker/login-action@v3 |
| 24 | | with: |
| 25 | | registry: ghcr.io |
| 26 | | username: ${{ github.actor }} |
| 27 | | password: ${{ secrets.GITHUB_TOKEN }} |
| 28 | | |
| 29 | | - name: Extract metadata |
| 30 | | id: meta |
| 31 | | uses: docker/metadata-action@v5 |
| 32 | | with: |
| 33 | | images: ghcr.io/${{ github.repository }} |
| 34 | | |
| 35 | | - name: Build and push |
| 36 | | uses: docker/build-push-action@v5 |
| 37 | | with: |
| 38 | | context: . |
| 39 | | push: true |
| 40 | | tags: ${{ steps.meta.outputs.tags }} |
| 41 | | labels: ${{ steps.meta.outputs.labels }} |
.github/workflows/ruff.yml
deleted
−42
| @@ -1,42 +0,0 @@ |
| 1 | | name: Ruff |
| 2 | | |
| 3 | | on: |
| 4 | | push: |
| 5 | | branches: [ "main" ] |
| 6 | | paths: |
| 7 | | - '**.py' |
| 8 | | pull_request: |
| 9 | | branches: [ "main" ] |
| 10 | | paths: |
| 11 | | - '**.py' |
| 12 | | |
| 13 | | jobs: |
| 14 | | build: |
| 15 | | runs-on: ubuntu-latest |
| 16 | | strategy: |
| 17 | | matrix: |
| 18 | | python-version: ["3.x"] |
| 19 | | steps: |
| 20 | | - uses: actions/checkout@v4 |
| 21 | | - name: Set up Python ${{ matrix.python-version }} |
| 22 | | uses: actions/setup-python@v5 |
| 23 | | with: |
| 24 | | python-version: ${{ matrix.python-version }} |
| 25 | | ref: ${{ github.event.pull_request.head.ref }} |
| 26 | | - name: Install dependencies |
| 27 | | run: | |
| 28 | | python -m pip install --upgrade pip |
| 29 | | pip install pandas dash plotly.express |
| 30 | | - name: Install Ruff |
| 31 | | uses: astral-sh/ruff-action@v3.2.2 |
| 32 | | - name: Ruff Actions |
| 33 | | run: | |
| 34 | | ruff check --fix |
| 35 | | ruff format |
| 36 | | - name: Add and Commit |
| 37 | | uses: EndBug/add-and-commit@v9 |
| 38 | | env: |
| 39 | | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 40 | | with: |
| 41 | | default_author: github_actions |
| 42 | | pathspec_error_handling: ignore |
Dockerfile
deleted
−31
| @@ -1,31 +0,0 @@ |
| 1 | | FROM python:3.12-slim |
| 2 | | |
| 3 | | ENV DEBIAN_FRONTEND=noninteractive \ |
| 4 | | HOMEBREW_NO_AUTO_UPDATE=1 \ |
| 5 | | PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}" |
| 6 | | |
| 7 | | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 8 | | curl \ |
| 9 | | git \ |
| 10 | | procps \ |
| 11 | | build-essential \ |
| 12 | | ca-certificates \ |
| 13 | | openssh-client \ |
| 14 | | && rm -rf /var/lib/apt/lists/* |
| 15 | | |
| 16 | | RUN useradd -m -s /bin/bash linuxbrew |
| 17 | | USER linuxbrew |
| 18 | | WORKDIR /home/linuxbrew |
| 19 | | |
| 20 | | RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| 21 | | |
| 22 | | RUN brew install emacs rsync uv minify |
| 23 | | |
| 24 | | RUN mkdir -p ~/.config/emacs/.local/straight/repos && \ |
| 25 | | cd ~/.config/emacs/.local/straight/repos && \ |
| 26 | | git clone --depth 1 https://github.com/emacsorphanage/htmlize.git && \ |
| 27 | | git clone --depth 1 https://github.com/emacs-love/templatel.git && \ |
| 28 | | git clone --depth 1 https://github.com/emacs-love/weblorg.git |
| 29 | | |
| 30 | | USER root |
| 31 | | WORKDIR /builds |