Skip to content

ci: add GitHub Actions workflows for project build and linting #12

ci: add GitHub Actions workflows for project build and linting

ci: add GitHub Actions workflows for project build and linting #12

Workflow file for this run

name: Build
on:
push:
branches: ['*']
pull_request:
branches: ['*']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create dummy .env for build
run: |
cat <<EOF > .env
NEXT_PUBLIC_FIREBASE_API_KEY=dummy
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=dummy
NEXT_PUBLIC_FIREBASE_PROJECT_ID=dummy
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=dummy
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=dummy
NEXT_PUBLIC_FIREBASE_APP_ID=dummy
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=dummy
MONGODB_URI=mongodb://localhost:27017/dummy
NEXT_PUBLIC_POSTHOG_KEY=dummy
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
EOF
- name: Build
run: npm run build