Title: Enable Preview Deployments on Vercel
Description:
Set up preview deployments on Vercel to streamline the review process for pull requests. This will allow team members to preview changes in a live environment before merging.
Acceptance Criteria:
- Configure Vercel to automatically deploy preview environments for each PR.
- Ensure that the deployment links are accessible from the PR interface.
- Verify that the preview environment accurately reflects the proposed changes.
😊 Happy to provide guidance and steps to anyone interested in taking on this task!
A sample github action for .github/workflows/vercel-preview.yaml.
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
pull_request:
branches:
- main
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: |
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
cp .vercel/.env.preview.local .env.local
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./
alias-domains: |
preview-kathfoss.vercel.app
preview-{{PR_NUMBER}}-kathfoss.vercel.app
Title: Enable Preview Deployments on Vercel
Description:
Set up preview deployments on Vercel to streamline the review process for pull requests. This will allow team members to preview changes in a live environment before merging.
Acceptance Criteria:
😊 Happy to provide guidance and steps to anyone interested in taking on this task!
A sample github action for
.github/workflows/vercel-preview.yaml.