From 78084b1d587e4fa136157e9171cd548de4cff599 Mon Sep 17 00:00:00 2001 From: vickytechkey Date: Tue, 8 Sep 2026 21:19:06 +0530 Subject: [PATCH] Install Node.js and build frontend assets with Vite --- .forgejo/workflows/setup-ec2.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/setup-ec2.yml b/.forgejo/workflows/setup-ec2.yml index dd07f4c9..d7e859cf 100644 --- a/.forgejo/workflows/setup-ec2.yml +++ b/.forgejo/workflows/setup-ec2.yml @@ -32,7 +32,11 @@ jobs: sudo apt-get update -y sudo apt-get install -y php8.4-fpm php8.4-cli php8.4-pgsql php8.4-mbstring php8.4-xml php8.4-curl php8.4-zip php8.4-bcmath php8.4-intl php8.4-redis php8.4-gd - # 3. Install Composer (PHP Package Manager) + # 3. Install Node.js (required for Vite frontend assets) + curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - + sudo apt-get install -y nodejs + + # 4. Install Composer (PHP Package Manager) if ! command -v composer &> /dev/null; then echo "Installing Composer..." EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" @@ -74,6 +78,10 @@ jobs: # Install PHP dependencies composer install --no-interaction --prefer-dist --optimize-autoloader + # Install Node.js dependencies and build frontend assets + npm install + npm run build + # Setup Laravel environment file and key if [ ! -f .env ]; then cp .env.example .env