Skip to content

chore(deps): bump actions/setup-node from 4 to 5 #91

chore(deps): bump actions/setup-node from 4 to 5

chore(deps): bump actions/setup-node from 4 to 5 #91

Workflow file for this run

name: 🚀 Deploy
on:
push:
branches:
- main
- dev
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
lint:
name: ⬣ Lint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⚙️ Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: ⎔ Setup node
uses: actions/setup-node@v5
with:
cache: pnpm
cache-dependency-path: 'package.json'
node-version: 20
- name: 📥 Install deps
run: pnpm install
- name: 🔬 Lint
run: pnpm run lint
- name: 🔎 Type check
run: pnpm run typecheck
vitest:
name: ⚡ Vitest
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⚙️ Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: ⎔ Setup node
uses: actions/setup-node@v5
with:
cache: pnpm
cache-dependency-path: 'package.json'
node-version: 20
- name: 📥 Install deps
run: pnpm install
- name: ⚡ Run vitest
run: pnpm run test --coverage
playwright:
name: 🎭 Playwright
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⚙️ Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: ⎔ Setup node
uses: actions/setup-node@v5
with:
cache: pnpm
cache-dependency-path: 'package.json'
node-version: 20
- name: 📥 Install deps
run: pnpm install
- name: 🏄 Copy test env vars
run: cp .env.example .env
- name: ⚙️ Build
run: pnpm run build
- name: Install Playwright browsers
run: pnpm run test:e2e:install
- name: 🎭 Playwright run
run: pnpm run test:e2e:run
deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
needs: [lint, vitest, playwright]
# only deploy main/dev branch on pushes
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: 👀 Read app name
uses: SebRollen/toml-action@v1.2.0
id: app_name
with:
file: fly.toml
field: app
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@1.5
- name: 🚀 Deploy Staging
if: ${{ github.ref == 'refs/heads/dev' }}
run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }}-staging
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: 🚀 Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}