Skip to content

Instantly share code, notes, and snippets.

@navincodesalot
Created July 30, 2024 21:31
Show Gist options
  • Save navincodesalot/cd5aeb9bae7a4fe3f2d2f5dd3aea4951 to your computer and use it in GitHub Desktop.
Save navincodesalot/cd5aeb9bae7a4fe3f2d2f5dd3aea4951 to your computer and use it in GitHub Desktop.
name: Lint | Build | Deploy to Preview
on:
push:
branches-ignore:
- main
env:
PYTHON_VERSION: 3.12
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
jobs:
lint_build:
name: Lint and Build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Pull Vercel Environment Information
run: |
npx vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project to Preview
run: |
echo "🎉 Deploying..."
npx vercel deploy --token=${{ secrets.VERCEL_TOKEN }} --no-wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment