diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 79e6faf82..4658dbf18 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -216,6 +216,16 @@ jobs: - name: Unzip build artifact run: | unzip build.zip + if [ -d "build" ]; then + DEPLOY_DIR="." + elif [ -d "websites/pan-dev/build" ]; then + DEPLOY_DIR="websites/pan-dev" + else + echo "Error: 'build' directory not found in current directory or in websites/pan-dev/" + exit 1 + fi + echo "Deploy directory found at: $DEPLOY_DIR" + echo "DEPLOY_DIR=$DEPLOY_DIR" >> $GITHUB_ENV - name: Deploy to Firebase id: deploy_preview @@ -226,5 +236,6 @@ jobs: projectId: pan-dev-f1b58 expires: 30d channelId: 'pr${{ github.event.number }}' + entryPoint: ${{ env.DEPLOY_DIR }} env: FIREBASE_CLI_PREVIEWS: hostingchannels