Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/actions/setup-node-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Setup Node and pnpm
description: Install pnpm, configure Node.js with pnpm cache, and optionally install dependencies.

inputs:
node-version:
description: Node.js version passed to actions/setup-node.
default: lts/*
install:
Comment thread
ZL-Asica marked this conversation as resolved.
description: Whether to run pnpm install.
default: 'true'

runs:
using: composite
steps:
- name: 🧰 Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: package.json

- name: 🧱 Setup Node (cache pnpm)
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: pnpm

- name: πŸ“¦ Install deps (frozen)
if: inputs.install == 'true'
shell: bash
run: pnpm install --frozen-lockfile
15 changes: 2 additions & 13 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,8 @@ jobs:
with:
fetch-depth: 0

- name: 🧰 Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: package.json

- name: 🧱 Setup Node (cache pnpm)
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: pnpm

- name: πŸ“¦ Install deps (frozen)
run: pnpm install --frozen-lockfile
- name: 🧱 Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: 🚨 Lint Code
run: pnpm run lint:ci
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/keep-supabase-alive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: πŸ«€ Keep Supabase Alive

on:
schedule:
# Run at midnight UTC on Sunday and Friday.
- cron: '0 0 * * 0,5'
workflow_dispatch:

concurrency:
group: keep-supabase-alive
cancel-in-progress: false

permissions: {}

jobs:
ping:
name: πŸ«€ Ping Supabase REST API
runs-on: ubuntu-latest
timeout-minutes: 5
env:
SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
SUPABASE_SECRET_KEY: ${{ secrets.SUPABASE_SECRET_KEY }}

steps:
- name: πŸ«€ Ping profile table
shell: bash
run: |
set -euo pipefail

if [ -z "${SUPABASE_URL:-}" ] || [ -z "${SUPABASE_SECRET_KEY:-}" ]; then
echo "::error::VITE_SUPABASE_URL and SUPABASE_SECRET_KEY secrets are required."
exit 1
fi

base_url="${SUPABASE_URL%/}"

curl --fail --show-error --silent \
--retry 3 \
--retry-delay 5 \
--max-time 20 \
"${base_url}/rest/v1/profile?select=id&limit=1" \
-H "apikey: ${SUPABASE_SECRET_KEY}" \
-H "Accept: application/json" \
--output /dev/null
Comment thread
ZL-Asica marked this conversation as resolved.
60 changes: 8 additions & 52 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,8 @@ jobs:
- name: πŸ“‚ Checkout
uses: actions/checkout@v4

- name: 🧰 Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: package.json

- name: 🧱 Setup Node (cache pnpm)
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: pnpm

- name: πŸ“¦ Install deps (frozen)
run: pnpm install --frozen-lockfile
- name: 🧱 Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: 🚨 Run lint
run: pnpm run lint:ci
Expand All @@ -50,19 +39,8 @@ jobs:
- name: πŸ“‚ Checkout
uses: actions/checkout@v4

- name: 🧰 Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: package.json

- name: 🧱 Setup Node (cache pnpm)
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: pnpm

- name: πŸ“¦ Install deps (frozen)
run: pnpm install --frozen-lockfile
- name: 🧱 Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: πŸ§ͺ Run unit tests
run: pnpm run test:unit
Expand Down Expand Up @@ -97,19 +75,8 @@ jobs:
- name: πŸ“‚ Checkout
uses: actions/checkout@v4

- name: 🧰 Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: package.json

- name: 🧱 Setup Node (cache pnpm)
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: pnpm

- name: πŸ“¦ Install deps (frozen)
run: pnpm install --frozen-lockfile
- name: 🧱 Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: 🎭 Install Playwright browsers
run: pnpm run test:e2e:install
Expand Down Expand Up @@ -229,19 +196,8 @@ jobs:
- name: πŸ“‚ Checkout
uses: actions/checkout@v4

- name: 🧰 Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: package.json

- name: 🧱 Setup Node (cache pnpm)
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: pnpm

- name: πŸ“¦ Install deps (frozen)
run: pnpm install --frozen-lockfile
- name: 🧱 Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: πŸ—οΈ Run build
run: pnpm run build
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,8 @@ jobs:
- name: πŸ“‚ Checkout
uses: actions/checkout@v4

- name: 🧰 Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: package.json

- name: 🧱 Setup Node (cache pnpm)
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: pnpm

- name: πŸ“¦ Install deps (frozen)
run: pnpm install --frozen-lockfile
- name: 🧱 Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: πŸ—οΈ Run build
run: pnpm run build
Expand Down
Loading