Skip to content

Deploy Docs

Deploy Docs #73

Workflow file for this run

name: Deploy Docs
on:
push:
branches:
- main
workflow_dispatch:
inputs:
branch:
description: 'GitHub branch to run the build off.'
required: true
default: 'master'
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
steps:
- name: Checkout n8n repo
uses: actions/checkout@v3
with:
repository: n8n-io/n8n
ref: ${{ github.event.inputs.branch || 'master' }}
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'pnpm'
- name: Build Storybook
run: |
pnpm install
cd packages/design-system/
pnpm build:storybook
cd storybook-static
git init
git config --local user.email "github-actions@users.noreply.github.com"
git config --local user.name "github-actions"
git add -A
git commit -m "Deploy" -a
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: 'packages/design-system/storybook-static'