Create Auth.js migration guide #501
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare repository | |
run: git fetch --unshallow --tags | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- 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: Create .env.local file | |
run: | | |
touch apps/app/.env.local | |
echo "CLERK_SECRET_KEY=sk_test_JA==" >> apps/app/.env.local | |
echo "CLERK_WEBHOOK_SECRET=whsec_test" >> apps/app/.env.local | |
echo "RESEND_AUDIENCE_ID=test" >> apps/app/.env.local | |
echo "[email protected]" >> apps/app/.env.local | |
echo "DATABASE_URL=postgresql://test:test@localhost:5432/test" >> apps/app/.env.local | |
echo "RESEND_TOKEN=re_test" >> apps/app/.env.local | |
echo "STRIPE_SECRET_KEY=sk_test" >> apps/app/.env.local | |
echo "STRIPE_WEBHOOK_SECRET=whsec_test" >> apps/app/.env.local | |
echo "BETTERSTACK_API_KEY=test" >> apps/app/.env.local | |
echo "BETTERSTACK_URL=https://test.com" >> apps/app/.env.local | |
echo "FLAGS_SECRET=FcnUGt7tT-4cOw-D_1GoXAH1bU7ljDBr01F5w4dxrdQ" >> apps/app/.env.local | |
echo "ARCJET_KEY=ajkey_test" >> apps/app/.env.local | |
echo "SVIX_TOKEN=testsk_test" >> apps/app/.env.local | |
echo "LIVEBLOCKS_SECRET=sk_test" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_JA==" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_GA_MEASUREMENT_ID=G-test" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_POSTHOG_KEY=phc_test" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_POSTHOG_HOST=https://test.com" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_WEB_URL=http://localhost:3001" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_DOCS_URL=http://localhost:3004" >> apps/app/.env.local | |
echo "NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL=http://localhost:3002" >> apps/app/.env.local | |
- name: Copy .env.local file | |
run: | | |
cp apps/app/.env.local apps/web/.env.local | |
cp apps/app/.env.local apps/api/.env.local | |
- name: Build with bundle analysis | |
run: pnpm analyze | |
- name: Upload bundle analysis artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundle-analysis | |
path: apps/**/.next/analyze/*.html |