Skip to content

Update deps

Update deps #52

Workflow file for this run

name: "Prod deploy"
on: push
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
# https://dev.to/mattpocock/how-to-cache-nodemodules-in-github-actions-with-yarn-24eh
- name: Cache node_modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
# - name: Cache playwright binaries
# uses: actions/cache@v4
# id: playwright-cache
# with:
# # keep the version in key in sync with package.json
# path: |
# ~/.cache/ms-playwright
# key: cache-playwright-linux-1.27.1
- run: yarn --immutable
# - name: Install Playwright
# if: steps.playwright-cache.outputs.cache-hit != 'true'
# run: npx playwright install --with-deps
- run: yarn lint
- run: yarn test:ci
# - run: yarn test:e2e
deploy:
name: Deploy to Vercel
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: "Deploy to Vercel"
run: |
prodRun=""
if [[ ${GITHUB_REF} == "refs/heads/main" ]]; then
prodRun="--prod"
fi
npx vercel --token ${VERCEL_TOKEN} $prodRun
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}