Merge pull request #1165 from synapsy-ai/dependabot/npm_and_yarn/vNex… #4652
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 Next.js Site | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create .env with Github Secrets | |
run: | | |
touch .env | |
echo NEXT_PUBLIC_SUPABASE_URL=$ENV_VAR_1 >> .env | |
echo NEXT_PUBLIC_SUPABASE_ANON_KEY=$ENV_VAR_2 >> .env | |
echo SUPABASE_SERVICE_ROLE_KEY=$ENV_VAR_3 >> .env | |
echo OPENAI_API_KEY=$ENV_VAR_4 >> .env | |
echo MISTRAL_API_KEY=$ENV_VAR_5 >> .env | |
echo STRIPE_SECRET_KEY=$ENV_VAR_6 >> .env | |
echo STRIPE_WEBHOOK_SECRET=$ENV_VAR_7 >> .env | |
env: | |
ENV_VAR_1: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} | |
ENV_VAR_2: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} | |
ENV_VAR_3: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
ENV_VAR_4: ${{ secrets.OPENAI_API_KEY }} | |
ENV_VAR_5: ${{ secrets.MISTRAL_API_KEY }} | |
ENV_VAR_6: ${{ secrets.STRIPE_SECRET_KEY }} | |
ENV_VAR_7: ${{ secrets.STRIPE_WEBHOOK_SECRET }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build |