Skip to content

🏗️ Fix basic example in README.md #69

🏗️ Fix basic example in README.md

🏗️ Fix basic example in README.md #69

Workflow file for this run

name: Build Rangee
run-name: 🏗️ ${{ github.event.head_commit.message }}
on:
workflow_call:
push:
branches:
- '*'
tags-ignore:
- '*'
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install node and yarn
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- name: Install deps
run: yarn install --frozen-lockfile
- name: Run lint
run: yarn lint
- name: Run build
run: yarn build
- name: Run unit tests
run: yarn test:unit:ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: yarn test:e2e
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
DeployExample:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Go to example directory
run: cd examples/nextjs
- name: Install node and yarn
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel environment information
run: vercel pull --yes --cwd ./examples/nextjs --scope=${{ secrets.VERCEL_TEAM_ID }} --token=${{ secrets.VERCEL_TOKEN }}
- name: Build project artifacts
run: vercel build --cwd ./examples/nextjs --scope=${{ secrets.VERCEL_TEAM_ID }} --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy
run: |
vercel deploy --cwd ./examples/nextjs --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > domain.txt
vercel alias --cwd ./examples/nextjs --scope=${{ secrets.VERCEL_TEAM_ID }} --token=${{ secrets.VERCEL_TOKEN }} set `cat domain.txt` rangee-example.vercel.app