Skip to content

Commit

Permalink
Changed workflow jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimck committed Feb 4, 2024
1 parent 65833c2 commit 8c201d6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 35 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,3 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx changeset publish --no-git-tag

deploy-storybook:
needs: [ci]
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outcome.page_url }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 20
cache: 'npm'

- name: Build storybook
run: npm run storybook:build --workspace=@utima/ui

- name: Upload storybook artifacts
uses: actions/upload-artifact@v4
with:
name: storybook-static
path: ./packages/ui/storybook-static

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: storybook-static
44 changes: 44 additions & 0 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Storybook

on:
push:
branches: [main]

jobs:
deploy-storybook:
name: Deploy Storybook
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outcome.page_url }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
shell: bash
run: npm ci --ignore-scripts

- name: Build storybook
run: npm run storybook:build --workspace=@utima/ui

- name: Upload storybook artifacts
uses: actions/upload-artifact@v4
with:
name: storybook-static
path: ./packages/ui/storybook-static

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: storybook-static

0 comments on commit 8c201d6

Please sign in to comment.