Update .gitea/workflows/deploy-static.yml
Some checks failed
Deploy Static Website / build-and-deploy (push) Failing after 1s
Some checks failed
Deploy Static Website / build-and-deploy (push) Failing after 1s
This commit is contained in:
@@ -12,21 +12,50 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
# Install Node.js manually
|
||||
- name: Install Node.js
|
||||
run: |
|
||||
# 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
|
||||
run: npm run build
|
||||
run: |
|
||||
# Debug information
|
||||
pwd
|
||||
ls -la
|
||||
|
||||
# Run build
|
||||
npm run build
|
||||
|
||||
- name: Deploy to static-websites
|
||||
run: |
|
||||
SITE_NAME=${GITHUB_REPOSITORY##*/}
|
||||
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
|
||||
mkdir -p "${DEPLOY_PATH}"
|
||||
|
||||
# Copy new files
|
||||
cp -r dist/* "${DEPLOY_PATH}/"
|
||||
cp -r dist/* "${DEPLOY_PATH}/"
|
||||
|
||||
# Debug permissions
|
||||
echo "Final deployment directory contents:"
|
||||
ls -la "${DEPLOY_PATH}"
|
||||
Reference in New Issue
Block a user