Skip to content

Commit

Permalink
ci: fix storybook publish
Browse files Browse the repository at this point in the history
  • Loading branch information
TimMikeladze committed Sep 6, 2023
1 parent e1cd35b commit 2b7fecb
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish

on:
release:
types: [published]

jobs:
publish-storybook:
needs: build
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: lts/*
- run: yarn
- run: yarn deploy-storybook --ci
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build and Deploy Storybook
run: yarn deploy-storybook --ci
env:
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
# Uncomment to enable auto publishing to npm
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# publish-npm:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: lts/*
# registry-url: https://registry.npmjs.org/
# - run: yarn
# - run: yarn build
# - run: npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# - name: Build and publish to npm
# if: github.ref == 'refs/tags/v*' # Only run on version tags
# run: |
# yarn build
# npm login --registry=https://registry.npmjs.org/ --scope=your-scope
# npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.YOUR_NPM_AUTH_TOKEN }}

0 comments on commit 2b7fecb

Please sign in to comment.