Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yelynnn authored Feb 8, 2025
1 parent 8e973d8 commit b0a93ce
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,44 @@ jobs:
- name: Run build script
run: |
echo "🔧 Running build script..."
sh -x ./build.sh
sh -x ./build.sh || { echo "🚨 build.sh 실행 실패!"; exit 1; }
- name: Check available directories after build
run: |
echo "🔍 Checking directories after build..."
ls -al
echo "🔍 Checking possible build output folders..."
ls -al output || echo "⚠️ output directory not found!"
ls -al dist || echo "⚠️ dist directory not found!"
ls -al build || echo "⚠️ build directory not found!"
echo "🔍 Checking inside subdirectories..."
find . -type d
- name: Detect correct build folder
id: detect-folder
run: |
if [ -d "output" ]; then
echo "BUILD_DIR=output" >> $GITHUB_ENV
elif [ -d "dist" ]; then
echo "🔎 Detecting build folder..."
if [ -d "dist" ]; then
echo "BUILD_DIR=dist" >> $GITHUB_ENV
echo "✅ Build directory set to: dist"
elif [ -d "output" ]; then
echo "BUILD_DIR=output" >> $GITHUB_ENV
echo "✅ Build directory set to: output"
elif [ -d "build" ]; then
echo "BUILD_DIR=build" >> $GITHUB_ENV
echo "✅ Build directory set to: build"
else
echo "🚨 ERROR: No known build directory (output, dist, build) found!"
exit 1
echo "BUILD_DIR=." >> $GITHUB_ENV
echo "⚠️ No specific build folder found, using root directory (.)"
fi
echo "✅ Build directory detected: $BUILD_DIR"
- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }}
with:
source-directory: ${{ env.BUILD_DIR }}
source-directory: ${{ env.BUILD_DIR }} # ✅ 전체 프로젝트 유지
destination-github-username: yelynnn
destination-repository-name: JMarketYard
user-email: ${{ secrets.EMAIL }}
commit-message: ${{ github.event.commits[0].message }}
commit-message: "Restore full repository - Automated Deployment" # ✅ 커밋 메시지 추가
target-branch: develop

- name: Test get variable exported by push-to-another-repository
Expand Down

0 comments on commit b0a93ce

Please sign in to comment.