diff --git a/.forgejo/workflows/deploy-cloudflare.yml b/.forgejo/workflows/deploy-cloudflare.yml index c8242b0..b0955d7 100644 --- a/.forgejo/workflows/deploy-cloudflare.yml +++ b/.forgejo/workflows/deploy-cloudflare.yml @@ -29,9 +29,26 @@ jobs: git clone "https://every-channel:${CODEBERG_TOKEN}@codeberg.org/every-channel/every.channel.git" .repo cd .repo fi - if ! command -v nix >/dev/null 2>&1; then - curl -L https://nixos.org/nix/install | sh -s -- --no-daemon - . "$HOME/.nix-profile/etc/profile.d/nix.sh" + + if ! command -v cargo >/dev/null 2>&1; then + curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal + . "$HOME/.cargo/env" + elif [[ -f "$HOME/.cargo/env" ]]; then + . "$HOME/.cargo/env" fi - nix --version - ./scripts/deploy-workers.sh + rustup target add wasm32-unknown-unknown + if ! command -v trunk >/dev/null 2>&1; then + cargo install trunk --locked + fi + + if ! command -v npm >/dev/null 2>&1; then + echo "error: npm is not available on this runner" + exit 2 + fi + + cd apps/tauri/ui + trunk build --release --public-url / + + cd ../../../deploy/cloudflare-worker + npm ci + npx wrangler deploy