Skip to content

Commit

Permalink
Add CD for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Xennis committed May 28, 2024
1 parent 7059237 commit 6194ff5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ jobs:
- args: [--frozen-lockfile]
- name: Check code format
run: pnpm run format:check
- name: Build packages
run: pnpm --filter './packages/*' run build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Deploy Next.js site to Pages
name: Deploy examples

on:
# Runs on pushes targeting the default branch
Expand Down Expand Up @@ -39,7 +39,8 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9
run_install: false
- name: Setup Pages
uses: actions/configure-pages@v5
with:
Expand All @@ -60,12 +61,19 @@ jobs:
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: "pnpm install --frozen-lockfile"
- name: Build packages
run: "pnpm --filter ./packages/render run build"
- name: Build with Next.js
run: "pnpm next build"
#run: "pnpm --filter ./examples/nextjs run build"
run: "pnpm run build"
working-directory: "./examples/nextjs"
env:
NOTION_ACCESS_TOKEN: ${{ secrets.NOTION_ACCESS_TOKEN }}
NOTION_BLOCK_ID: ${{ vars.NOTION_BLOCK_ID }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out
path: ./examples/nextjs/out

# Deployment job
deploy:
Expand Down
2 changes: 0 additions & 2 deletions examples/nextjs/src/lib/fetchers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use server"

import { unstable_cache } from "next/cache"
import { fetchBlocksChildren } from "@react-notion-cms/render"
import { Client } from "@notionhq/client"
Expand Down

0 comments on commit 6194ff5

Please sign in to comment.