fast furious #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Vercel on Merge | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_deploy: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Bun | |
run: | | |
curl -fsSL https://bun.sh/install | bash | |
echo "$HOME/.bun/bin" >> $GITHUB_PATH | |
- name: Install Global Package with Bun | |
run: bun install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Generate Source Code Preview | |
run: bun run generate-preview | |
- name: Build Project Artifacts | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
env: | |
ANALYTICS_CLIENT_URL: ${{ secrets.ANALYTICS_CLIENT_URL }} | |
ANALYTICS_CLIENT_SECRET: ${{ secrets.ANALYTICS_CLIENT_SECRET }} | |
ANALYTICS_CLIENT_ID: ${{ secrets.ANALYTICS_CLIENT_ID }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |