maxGraph/.github/workflows/generate-website.yml

39 lines
975 B
YAML

name: Generate website
on:
pull_request:
branches:
- development
paths:
- '.github/workflows/generate-website.yml'
- '.nvmrc'
- 'packages/core/**/*'
- 'packages/website/**/*'
- '!packages/website/README.md'
- 'package.json'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm install
- name: Build @maxgraph/core API docs
working-directory: packages/core
run: npm run docs:api
- name: Build website
working-directory: packages/website
run: npm run build
- name: Upload website artifact
uses: actions/upload-artifact@v3
with:
name: website-${{github.sha}}
path: |
packages/core/build/api/
packages/website/build/