Skip to content

Implement Posthog

Implement Posthog #281

Workflow file for this run

# Name of our action
name: Build
# The event that will trigger the action
on:
pull_request:
branches: [main]
env:
NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL: "http://localhost:3000/"
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: "pk_test_JA=="
CLERK_SECRET_KEY: "sk_test_JA=="
NEXT_PUBLIC_CLERK_SIGN_IN_URL: "test"
NEXT_PUBLIC_CLERK_SIGN_UP_URL: "test"
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: "test"
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: "test"
CLERK_WEBHOOK_SECRET: "whsec_test"
RESEND_AUDIENCE_ID: "test"
RESEND_FROM: "test"
DATABASE_URL: "test"
NEXT_PUBLIC_APP_URL: "http://localhost:3001/"
NEXT_PUBLIC_DOCS_URL: "http://localhost:3002/"
RESEND_TOKEN: "test"
STRIPE_SECRET_KEY: "test"
STRIPE_WEBHOOK_SECRET: "test"
NEXT_PUBLIC_GA_MEASUREMENT_ID: "test"
NEXT_PUBLIC_POSTHOG_KEY: "test"
NEXT_PUBLIC_POSTHOG_HOST: "test"
# what the action will do
jobs:
build:
# The operating system it will run on
runs-on: ubuntu-latest
# This check needs to be in place to prevent a publish loop with auto and github actions
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
# The list of steps that the action will go through
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Install Node.js
uses: actions/setup-node@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build