Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,8 @@ jobs:
run: |
# Remove any existing .vercel directory to avoid conflicts
rm -rf .vercel
# Create .vercel directory with project configuration
mkdir -p .vercel
echo '{"orgId":"${{ secrets.VERCEL_ORG_ID }}","projectId":"${{ secrets.VERCEL_PROJECT_ID }}"}' > .vercel/project.json
# Deploy to staging
vercel --token ${{ secrets.VERCEL_TOKEN }} --yes
# Deploy directly using scope and project flags
vercel --token ${{ secrets.VERCEL_TOKEN }} --scope ${{ secrets.VERCEL_ORG_ID }} --yes
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
Expand Down Expand Up @@ -304,11 +301,8 @@ jobs:
run: |
# Remove any existing .vercel directory to avoid conflicts
rm -rf .vercel
# Create .vercel directory with project configuration
mkdir -p .vercel
echo '{"orgId":"${{ secrets.VERCEL_ORG_ID }}","projectId":"${{ secrets.VERCEL_PROJECT_ID }}"}' > .vercel/project.json
# Deploy to production
vercel --prod --token ${{ secrets.VERCEL_TOKEN }} --yes
# Deploy directly using scope and project flags
vercel --prod --token ${{ secrets.VERCEL_TOKEN }} --scope ${{ secrets.VERCEL_ORG_ID }} --yes
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
Expand Down Expand Up @@ -338,11 +332,10 @@ jobs:

- name: Rollback deployment
run: |
# Create .vercel directory with project configuration
mkdir -p .vercel
echo '{"orgId":"${{ secrets.VERCEL_ORG_ID }}","projectId":"${{ secrets.VERCEL_PROJECT_ID }}"}' > .vercel/project.json
# Perform rollback
vercel rollback --token ${{ secrets.VERCEL_TOKEN }} --yes
# Remove any existing .vercel directory to avoid conflicts
rm -rf .vercel
# Perform rollback using scope flag
vercel rollback --token ${{ secrets.VERCEL_TOKEN }} --scope ${{ secrets.VERCEL_ORG_ID }} --yes
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
Expand Down
13 changes: 4 additions & 9 deletions scripts/test-ci-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,10 @@ test_vercel_commands() {
print_status "Vercel CLI version:"
vercel --version

# Test project configuration creation
print_status "Testing Vercel project configuration creation..."
echo "mkdir -p .vercel"
echo "echo '{\"orgId\":\"\$VERCEL_ORG_ID\",\"projectId\":\"\$VERCEL_PROJECT_ID\"}' > .vercel/project.json"

# Test deployment command structure
print_status "Testing Vercel deployment command structure..."
echo "vercel --token \$VERCEL_TOKEN --yes"
echo "vercel --prod --token \$VERCEL_TOKEN --yes"
# Test direct deployment with scope flag
print_status "Testing Vercel direct deployment with scope flag..."
echo "vercel --token \$VERCEL_TOKEN --scope \$VERCEL_ORG_ID --yes"
echo "vercel --prod --token \$VERCEL_TOKEN --scope \$VERCEL_ORG_ID --yes"

print_success "Vercel command testing completed!"
}
Expand Down
Loading