Skip to content

Commit

Permalink
npm i and build script
Browse files Browse the repository at this point in the history
  • Loading branch information
valiantlynx committed Sep 18, 2024
1 parent a7620fb commit c399d67
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gh-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ else
git checkout -b $NEW_BRANCH
fi

# Run npm install to install dependencies
echo "Running npm install..."
npm install

# Check if the build directory exists
if [ ! -d "build" ]; then
echo "Build directory not found. Running build command..."
# Replace this with your actual build command
npm run build
fi

# Perform the operations on the new branch
# Exclude the .git directory and .env file from deletion
find . -mindepth 1 -not -path "./build*" -not -path "./.git*" -not -name ".env" -exec rm -rf {} + 2>/dev/null
Expand Down

0 comments on commit c399d67

Please sign in to comment.