Skip to content

Commit

Permalink
Merge pull request #4 from n8n-io/pnpm
Browse files Browse the repository at this point in the history
Update workflow to use pnpm and latest actions
  • Loading branch information
MiloradFilipovic authored Nov 22, 2022
2 parents 5cbbad7 + a99875d commit 315d733
Showing 1 changed file with 33 additions and 12 deletions.
45 changes: 33 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,57 @@ name: Deploy Docs
on:
push:
branches:
- main
- 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:
- uses: actions/checkout@v2
- name: Build and deploy
uses: actions/setup-node@v1
- uses: actions/checkout@v3
with:
node-version: 14.x
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 and build

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7.14.2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'pnpm'

- name: Checkout n8n repo
uses: actions/checkout@v3
with:
repository: n8n-io/n8n
ref: ${{ github.event.inputs.branch || 'master' }}
path: n8n

- name: Build Storybook
working-directory: n8n
run: |
git clone https://github.com/n8n-io/n8n
cd n8n
git checkout N8N-5602-form-inputs-updates
pnpm install
cd packages/design-system/
npm install
npm run build:storybook
pnpm build:storybook
cd storybook-static
git init
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git add -A
git commit -m "Deploy" -a
- name: push
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 315d733

Please sign in to comment.