Skip to content

Commit

Permalink
sprinkling some refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Apr 8, 2024
1 parent 2ab8d9e commit d35946e
Showing 1 changed file with 61 additions and 22 deletions.
83 changes: 61 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,32 @@ jobs:
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

- name: Use Node.js 20
uses: actions/setup-node@v4
- 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:
node-version: 20
cache: 'pnpm'
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 --frozen-lockfile
run: pnpm install

- name: Format check
run: pnpm format:check
Expand All @@ -53,18 +67,32 @@ jobs:
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

- name: Use Node.js 20
uses: actions/setup-node@v4
- 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:
node-version: 20
cache: 'pnpm'
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 --frozen-lockfile
run: pnpm install

- name: Build marketing website
run: pnpm turbo build --filter=marketing
Expand All @@ -82,9 +110,6 @@ jobs:
NEON_API_KEY: ${{ secrets.NEON_API_KEY }}
NEON_PROJECT_ID: ${{ secrets.NEON_PROJECT_ID }}

# Database URL
DATABASE_URL: '${{ needs.create-db-branch.outputs.db_url }}?sslmode=require'

# Authentication
AUTH_GITHUB_ID: ${{ secrets.AUTH_GITHUB_ID }}
AUTH_GITHUB_SECRET: ${{ secrets.AUTH_GITHUB_SECRET }}
Expand All @@ -104,18 +129,32 @@ jobs:
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

- name: Use Node.js 20
uses: actions/setup-node@v4
- 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:
node-version: 20
cache: 'pnpm'
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 --frozen-lockfile
run: pnpm install

- name: Get branch name
id: branch_name
Expand All @@ -132,5 +171,5 @@ jobs:

- name: Build
env:
DATABASE_URL: ${{ steps.create-branch.outputs.db_url }}?sslmode=require
DATABASE_URL: '${{ steps.create-branch.outputs.db_url }}?sslmode=require'
run: pnpm turbo build --filter=web

0 comments on commit d35946e

Please sign in to comment.