cleared vercel.json #16
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: CI | |
# run pipeline on all branches | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: | | |
export NODE_OPTIONS="--max-old-space-size=8192" | |
npx next build | |
- name: Sentry release setup | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
run: | | |
npx sentry-cli releases new --project sattrack ${{ github.sha }} | |
npx sentry-cli releases set-commits --auto --ignore-missing --project sattrack ${{ github.sha }} | |
npx sentry-cli releases finalize --project sattrack ${{ github.sha }} | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: | | |
export NODE_OPTIONS="--max-old-space-size=4096" | |
npm run test | |
- name: Archive test results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: junit-test-results | |
path: junit.xml | |
deploy_preview: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/dev' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Vercel CLI | |
run: npm install --global vercel | |
- name: Deploy to Vercel (Preview) | |
env: | |
VERCEL_TOKEN: ${{ secrets.SATTRACK_TOKEN }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
run: | | |
vercel pull --yes --environment=preview --token=$VERCEL_TOKEN | |
vercel build --token=$VERCEL_TOKEN | |
vercel deploy --prebuilt --token=$VERCEL_TOKEN | |
deploy_production: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Vercel CLI | |
run: npm install --global vercel | |
- name: Deploy to Vercel (Production) | |
env: | |
VERCEL_TOKEN: ${{ secrets.SATTRACK_TOKEN }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
run: | | |
vercel pull --yes --environment=production --token=$VERCEL_TOKEN | |
vercel build --prod --token=$VERCEL_TOKEN | |
vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN |