generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.04 KB
/
deploy-pr-preview.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Storybook PR Preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
paths:
- "packages/ui-components/**"
# The paths-ignore option only prevents the workflow from running if all the changed files match the ignore patterns
paths-ignore:
- '**.md'
# Limit the concurrency of entire workflow
concurrency: deploy-pr-preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: [default]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install dependencies
if: github.event.action != 'closed'
run: |
npm install --force
- name: Build storybook
run: npm -w @cloudoperators/juno-ui-components run build-storybook
- uses: rossjrw/pr-preview-action@v1
with:
source-dir: packages/ui-components/storybook-static
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto