Skip to content

Update dates

Update dates #89

Workflow file for this run

name: Deployment
on:
push:
branches:
- main
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
lint:
name: ⬣ EsLint
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 22
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
- name: 🔬 Lint
run: npm run lint
typecheck:
name: ʦ TypeScript
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 22
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
- name: 🔎 Type check
run: npm run typecheck --if-present
vitest:
name: ⚡ Vitest
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 22
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
- name: 🏄 Copy test env vars
run: cp .env.example .env
- name: ⚡ Run vitest
run: npm run test -- --coverage
playwright:
name: 🎭 Playwright
runs-on: ubuntu-22.04
timeout-minutes: 60
environment: test
env:
SENTRY_DSN: https://20c628330a59c4df20fd2c0ba7f2873c@o4505819035467776.ingest.sentry.io/4505819065286656
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
BUTTONDOWN_API_KEY: ${{ secrets.BUTTONDOWN_API_KEY }}
HONEYPOT_SECRET: ${{ secrets.HONEYPOT_SECRET }}
AIRTABLE_API_KEY: ${{ secrets.AIRTABLE_API_KEY }}
SANITY_PUBLIC_PROJECT_ID: iaejvb99
SANITY_PUBLIC_DATASET: production
SANITY_PUBLIC_API_VERSION: 2023-10-01
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: 🏄 Copy test env vars
run: cp .env.example .env
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 22
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
- name: 📥 Install Playwright Browsers
run: npm run test:e2e:install
- name: 🏗 Build
run: npm run build
- name: 🎭 Playwright tests
run: npx playwright test
- name: 📊 Upload report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
deploy:
name: 🚀 Deploy
runs-on: ubuntu-22.04
needs: [vitest, playwright]
if: ${{ github.event_name == 'push' }}
environment: production
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: 👀 Read app name
uses: SebRollen/[email protected]
id: app_name
with:
file: 'fly.toml'
field: 'app'
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/[email protected]
- name: 🚀 Deploy
if: ${{ github.ref == 'refs/heads/main' }}
run:
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
--build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}