Files
site/.gitea/workflows/ci.yaml
Jeremy ca37894e8b
Some checks failed
Build / build (push) Failing after 8s
fix: move -r parameter removed
2026-01-31 18:52:59 -05:00

42 lines
915 B
YAML

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Cargo Dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build
run: cargo build --release
- name: Move to opt
run: |
mkdir -p /opt/site
mv target/release/site /opt/site
mv static /opt/site
mv templates /opt/site
- name: Restart site
working-directory: /opt/site
run: |
pkill site || true
nohup ./target/release/site > server.log 2>&1 &