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
15 changes: 9 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ jobs:
run: |
# Remove any existing .vercel directory to avoid conflicts
rm -rf .vercel
# Link project using environment variables
vercel link --token ${{ secrets.VERCEL_TOKEN }} --yes
# 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
env:
Expand Down Expand Up @@ -303,8 +304,9 @@ jobs:
run: |
# Remove any existing .vercel directory to avoid conflicts
rm -rf .vercel
# Link project using environment variables
vercel link --token ${{ secrets.VERCEL_TOKEN }} --yes
# 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
env:
Expand Down Expand Up @@ -336,8 +338,9 @@ jobs:

- name: Rollback deployment
run: |
# Link project using environment variables
vercel link --token ${{ secrets.VERCEL_TOKEN }} --yes
# 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
env:
Expand Down
7 changes: 4 additions & 3 deletions scripts/test-ci-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ test_vercel_commands() {
print_status "Vercel CLI version:"
vercel --version

# Test linking (this will fail with dummy secrets, but we can see the command structure)
print_status "Testing Vercel link command structure..."
echo "vercel link --token \$VERCEL_TOKEN --yes"
# 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..."
Expand Down
Loading