Skip to content

Commit

Permalink
build: add styles storybook release action (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfellerph authored Nov 10, 2022
1 parent 8a01ea7 commit 2b57af8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release-styles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
###
#
# Release the demo app whenever it's package json changes on the main branch
#
###

name: Release Styles Storybook

on:
push:
branches:
- main
paths:
- 'packages/styles/package.json'
- 'packages/styles/src/**/*.stories.*'
- 'packages/styles/.storybook/**'

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release demo
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: swisspost/design-system/.github/actions/setup-pnpm@main

- name: Install
run: pnpm --filter "design-system-styles..." install

- name: Build
run: pnpm --filter "design-system-styles..." build

- name: Publish
env:
NETLIFY_SITE_ID: ${{ secrets.STYLES_NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
netlify link --id $NETLIFY_SITE_ID
netlify deploy --build false --dir packages/styles/storybook-static --prod
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"bootstrap": "pnpm install && pnpm -r build",
"start": "pnpm demo:start",
"demo:start": "pnpm --filter design-system-demo --filter design-system-styles --parallel --stream start",
"styles:start": "pnpm --filter design-system-styles storybook:serve",
"styles:start": "pnpm --filter design-system-styles start",
"components:start": "pnpm --filter design-system-components start",
"intranet-header:start": "pnpm --filter design-system-components-angular start",
"docs:start": "pnpm --filter design-system-documentation start",
Expand Down
4 changes: 2 additions & 2 deletions packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
},
"scripts": {
"clean": "rimraf out-tsc dist/*",
"start": "npm-run-all --parallel styles:start && schematics:start",
"start": "npm-run-all --parallel styles:start storybook:start schematics:start",
"prebuild": "pnpm clean",
"build": "npm-run-all --parallel styles:build && pnpm schematics:build",
"build": "npm-run-all --parallel styles:build schematics:build storybook:build",
"format": "prettier src/**/*.scss --write",
"lint": "stylelint src/**/*.scss",
"lint:fix": "stylelint src/**/*.scss --fix",
Expand Down

0 comments on commit 2b57af8

Please sign in to comment.