Update .gitea/workflows/deploy-static.yml
All checks were successful
Deploy Static Website / build-and-deploy (push) Successful in 2s

This commit is contained in:
2025-01-09 07:33:15 +00:00
parent 597be9f941
commit 857be3e4d1

View File

@@ -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}"