From 135523280c963f6ec965e78206169a73e5d40b9a Mon Sep 17 00:00:00 2001 From: Jakub Czarlinski Date: Mon, 30 Oct 2023 01:06:27 +0000 Subject: [PATCH] Use .env.local and fix typo. --- .github/workflows/deploy.yml | 9 +++++---- src/app/calendar/api.tsx | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c87402c..f77c701 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -69,10 +69,11 @@ jobs: - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - name: Build with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next build - env: - GOOGLE_CAL_API_KEY: ${{ secrets.GOOGLE_CAL_API_KEY }} - GOOGLE_CAL_ID: ${{ secrets.GOOGLE_CAL_ID }} + run: | + touch .env.local + echo "GOOGLE_CAL_API_KEY=${{ secrets.GOOGLE_CAL_API_KEY }}" >> .env.local + echo "GOOGLE_CAL_ID=${{ secrets.GOOGLE_CAL_ID }}" >> .env.local + ${{ steps.detect-package-manager.outputs.runner }} next build - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: diff --git a/src/app/calendar/api.tsx b/src/app/calendar/api.tsx index cc36841..8c98157 100644 --- a/src/app/calendar/api.tsx +++ b/src/app/calendar/api.tsx @@ -7,7 +7,7 @@ import FullCalendar from "@fullcalendar/react"; import React from "react"; const apiKey = process.env.GOOGLE_CAL_API_KEY || "FAKE_KEY"; -const calendarId = process.env.GOOGLE_CALENDAR_ID || "FAKE_ID"; +const calendarId = process.env.GOOGLE_CAL_ID || "FAKE_ID"; export default class Calendar extends React.Component { render() {