From 857be3e4d130a226b4ddfe837bb5d5a7ca2c20bb Mon Sep 17 00:00:00 2001 From: cardosofelipe Date: Thu, 9 Jan 2025 07:33:15 +0000 Subject: [PATCH] Update .gitea/workflows/deploy-static.yml --- .gitea/workflows/deploy-static.yml | 33 +++++++++++++++++++----------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/deploy-static.yml b/.gitea/workflows/deploy-static.yml index a99db3b..fd77f76 100644 --- a/.gitea/workflows/deploy-static.yml +++ b/.gitea/workflows/deploy-static.yml @@ -10,7 +10,6 @@ jobs: runs-on: static-sites steps: - # Instead of actions/checkout, we'll use git directly - name: Clone Repository run: | echo "Starting repository clone..." @@ -21,28 +20,39 @@ jobs: git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY . git checkout $GITHUB_SHA - # Show what we got echo "Repository contents:" ls -la - name: Install Node.js run: | - echo "Installing Node.js..." - # Install curl first - apt-get update && apt-get install -y curl - # Install Node.js - curl -fsSL https://deb.nodesource.com/setup_18.x | bash - - apt-get install -y nodejs + echo "Installing Node.js using Alpine package manager..." + # Update package list and install required tools + apk update + # Install Node.js and npm from Alpine packages + apk add nodejs npm + # Verify installation + echo "Node.js version:" node --version + echo "npm version:" + npm --version - name: Build site run: | echo "Building site..." + echo "Current directory contents:" + ls -la + # Install dependencies + echo "Installing npm dependencies..." npm install - # Build + + # Build the site + echo "Running build command..." npm run build + + echo "Build output:" + ls -la dist/ - name: Deploy to static-websites run: | @@ -50,12 +60,11 @@ jobs: SITE_NAME=${GITHUB_REPOSITORY##*/} DEPLOY_PATH="/static-websites/${SITE_NAME}" - # Create deployment directory + echo "Creating deployment directory: ${DEPLOY_PATH}" mkdir -p "${DEPLOY_PATH}" - # Copy files + echo "Copying files to deployment directory..." cp -r dist/* "${DEPLOY_PATH}/" - # Show results echo "Deployed files:" ls -la "${DEPLOY_PATH}" \ No newline at end of file