chore(ui): fix Grid stories after Typescript migration (#598) #99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run it locally with act (https://github.com/nektos/act) | |
# 1. Install act: | |
# `brew install act` | |
# 2. Create a .secret file with the following content: | |
# `GITHUB_TOKEN=your_github_token` | |
# PULL REQUEST | |
# 1. Create a act_pull_request.json file in case of a pull request with the following content: | |
# `{"pull_request": {"number": <PR number>, "head": {"ref": "<PR branch name>", "sha": "PR commit sha"}, "base": {"ref": "main"}}, "repository": {"name": "juno", "owner": {"login": "cloudoperators"}}}` | |
# 2. Run the following command: | |
# `act push --container-architecture linux/amd64 -P default=catthehacker/ubuntu:act-latest -e act_push.json -W .github/workflows/deploy-github-pages.yaml` | |
name: Storybook to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "packages/ui-components/**" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
concurrency: deploy-gh-pages-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. | |
runs-on: [default] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
run: | | |
npm install --force | |
- name: Build storybook | |
run: npm -w @cloudoperators/juno-ui-components run build-storybook | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: packages/ui-components/storybook-static | |
clean-exclude: pr-preview/ | |
force: false |