Skip to content

Commit

Permalink
ci: deploy-vitepress.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ktKongTong committed Dec 28, 2024
1 parent fe8ece3 commit 79ca1f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy-vitepress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ jobs:
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Determine Deployment Environment
id: get-deploy-env
run: |
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
echo "TARGET_ENV=preview" >> $GITHUB_OUTPUT
else
echo "TARGET_ENV=production" >> $GITHUB_OUTPUT
fi
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=${{ steps.Determine_Deployment_Environment.outputs.TARGET_ENV }} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel pull --yes --environment=${{ steps.get-deploy-env.outputs.TARGET_ENV }} --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --target=${{ steps.Determine_Deployment_Environment.outputs.TARGET_ENV }} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel build --target=${{ steps.get-deploy-env.outputs.TARGET_ENV }} --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --target=${{ steps.Determine_Deployment_Environment.outputs.TARGET_ENV }}
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --target=${{ steps.get-deploy-env.outputs.TARGET_ENV }}

0 comments on commit 79ca1f1

Please sign in to comment.