Skip to content

Commit

Permalink
ci: migrate to github-actions-storybook-to-github-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeliatf authored Jul 9, 2024
1 parent 2d4bf81 commit 5ed9732
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 179 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ on:
branches:
- master

permissions:
contents: read
pages: write
id-token: write

jobs:
faency:
name: Deploy
if: github.repository == 'traefik/faency'
runs-on: ubuntu-latest

steps:
Expand All @@ -25,18 +31,12 @@ jobs:
git config --local user.email "30906710+traefiker@users.noreply.github.com"
git config --local user.name "traefiker"
- name: Install
run: yarn install --frozen-lockfile --production

- name: Patch
run: yarn patch

- name: Build
env:
NODE_ENV: production
run: yarn build

- name: Deploy
run: yarn deploy-storybook
uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_ENV: production
with:
install_command: yarn install --frozen-lockfile --production && yarn patch
build_command: yarn build-storybook
path: storybook-static
checkout: false
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release

on:
push:
branches:
Expand All @@ -7,6 +8,7 @@ on:
jobs:
faency:
name: Release
if: github.repository == 'traefik/faency'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 6006 -h localhost",
"storybook-docs": "storybook dev --docs",
"build-storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider storybook build",
"deploy-storybook": "storybook-to-ghpages",
"test": "jest --watch",
"test:ci": "jest --ci --silent",
"patch": "patch-package",
Expand Down Expand Up @@ -98,7 +97,6 @@
"@storybook/mdx2-csf": "^0.0.3",
"@storybook/react": "^7.6.17",
"@storybook/react-vite": "^7.6.17",
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/theming": "^7.6.17",
"@types/jest": "^27.4.1",
"@types/jest-axe": "^3.5.3",
Expand Down
Loading

0 comments on commit 5ed9732

Please sign in to comment.