Skip to content

Commit

Permalink
fix: build & check page in PR and master
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Mar 2, 2024
1 parent 49097e5 commit 1440c15
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Simple workflow for deploying static content to GitHub Pages
name: Check Docs build

on:
# Only check if we can build the doc in PR
pull_request:
branches:
- master

env:
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
NODE_OPTIONS: --max-old-space-size=6144

jobs:
# Single deploy job since we're just deploying
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: pnpm
- name: Install dependencies
run: pnpm i
- name: Gen API Docs
run: pnpm run docs:generate
- name: Build Docs Site
run: pnpm run docs:build
6 changes: 0 additions & 6 deletions .github/workflows/deploy-docs-to-github-pages copy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
# Runs on pushes targeting the default branch
push:
branches: [master]
pull_request:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down Expand Up @@ -51,15 +48,12 @@ jobs:
- name: Build Docs Site
run: pnpm run docs:build
- name: Setup Pages
if: github.event.pull_request.merged == true
uses: actions/configure-pages@v3
- name: Upload artifact
if: github.event.pull_request.merged == true
uses: actions/upload-pages-artifact@v2
with:
# Upload the folder /build generated by docusaurus
path: build
- name: Deploy to GitHub Pages
if: github.event.pull_request.merged == true
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 1440c15

Please sign in to comment.