Skip to content

Commit 81368de

Browse files
committed
ci: read gatsby's env var
1 parent 0636e84 commit 81368de

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313

1414
- run: yarn install
1515

16+
- name: Set Sched's API token env
17+
run: echo "SCHED_ACCESS_TOKEN=${{ secrets.SCHED_ACCESS_TOKEN }}" >> .env.production
18+
1619
# Verify it compiles
1720
- run: yarn build
1821

gatsby-node.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import { updateCodeData } from "./scripts/update-code-data/update-code-data"
77
import { organizeCodeData } from "./scripts/update-code-data/organize-code-data"
88
import { sortCodeData } from "./scripts/update-code-data/sort-code-data"
99

10+
require("dotenv").config({
11+
path: `.env.${process.env.NODE_ENV}`,
12+
})
13+
1014
export const createSchemaCustomization: GatsbyNode["createSchemaCustomization"] =
1115
async ({ actions }) => {
1216
const gql = String.raw

0 commit comments

Comments
 (0)