Update .gitea/workflows/deploy-static.yml
Some checks failed
Deploy Static Website / build-and-deploy (push) Failing after 1s

This commit is contained in:
2025-01-09 07:28:41 +00:00
parent 847e8ce46d
commit 87b02e7526

View File

@@ -12,21 +12,50 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Node.js # Install Node.js manually
uses: actions/setup-node@v3 - name: Install Node.js
with: run: |
node-version: 18 # Update package list
apt-get update
# Install Node.js prerequisites
apt-get install -y curl
# Install Node.js using their official setup
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
# Verify installation
node --version
npm --version
- name: Build site - name: Build site
run: npm run build run: |
# Debug information
pwd
ls -la
# Run build
npm run build
- name: Deploy to static-websites - name: Deploy to static-websites
run: | run: |
SITE_NAME=${GITHUB_REPOSITORY##*/} SITE_NAME=${GITHUB_REPOSITORY##*/}
DEPLOY_PATH="/static-websites/${SITE_NAME}" DEPLOY_PATH="/static-websites/${SITE_NAME}"
# Debug information
echo "Deploying to: ${DEPLOY_PATH}"
echo "Contents of current directory:"
ls -la
echo "Contents of dist directory:"
ls -la dist || echo "dist directory not found!"
# Ensure directory exists # Ensure directory exists
mkdir -p "${DEPLOY_PATH}" mkdir -p "${DEPLOY_PATH}"
# Copy new files # Copy new files
cp -r dist/* "${DEPLOY_PATH}/" cp -r dist/* "${DEPLOY_PATH}/"
# Debug permissions
echo "Final deployment directory contents:"
ls -la "${DEPLOY_PATH}"