From 386585e060072eb859253f923e9f173347b9cd8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Pot=C4=99pa?= Date: Thu, 12 Oct 2023 09:09:09 +0200 Subject: [PATCH 1/2] ci: update default branch naim in workflows NO-JIRA --- .github/workflows/{node.js.yml => build-n-test.yml} | 6 +++--- .github/workflows/build-storybook.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{node.js.yml => build-n-test.yml} (92%) diff --git a/.github/workflows/node.js.yml b/.github/workflows/build-n-test.yml similarity index 92% rename from .github/workflows/node.js.yml rename to .github/workflows/build-n-test.yml index 172d0466..4c70014b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/build-n-test.yml @@ -1,13 +1,13 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Node.js CI +name: Build and test on: push: - branches: ['development'] + branches: ['main'] pull_request: - branches: ['development'] + branches: ['main'] jobs: build: diff --git a/.github/workflows/build-storybook.yml b/.github/workflows/build-storybook.yml index d23832cf..4990c85f 100644 --- a/.github/workflows/build-storybook.yml +++ b/.github/workflows/build-storybook.yml @@ -3,7 +3,7 @@ name: Build Storybook on: push: branches: - - development + - main # Review gh actions docs if you want to further define triggers, paths, etc # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on From f75dd0941ab65a67cb94b108319dcbedfb49c0d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Pot=C4=99pa?= Date: Thu, 12 Oct 2023 09:37:01 +0200 Subject: [PATCH 2/2] chore: added cname with custom storybook domain NO-JIRA --- .github/workflows/build-storybook.yml | 2 -- .storybook/lightTheme.ts | 4 +--- public/CNAME | 1 + 3 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 public/CNAME diff --git a/.github/workflows/build-storybook.yml b/.github/workflows/build-storybook.yml index 4990c85f..c274990a 100644 --- a/.github/workflows/build-storybook.yml +++ b/.github/workflows/build-storybook.yml @@ -21,8 +21,6 @@ jobs: - name: Install dependencies run: yarn install --frozen-lockfile - name: Build Storybook - env: - STORYBOOK_HOST: tetrisly-react run: yarn build-storybook # Popular action to deploy to GitHub Pages: diff --git a/.storybook/lightTheme.ts b/.storybook/lightTheme.ts index 82c430bf..4f121f7d 100644 --- a/.storybook/lightTheme.ts +++ b/.storybook/lightTheme.ts @@ -1,7 +1,5 @@ import { create } from '@storybook/theming/create'; -const STORYBOOK_HOST = process?.env?.STORYBOOK_HOST; - export default create({ base: 'light', colorPrimary: '#272E35', @@ -12,7 +10,7 @@ export default create({ // Branding brandTitle: 'Tetrisly - React Components', - brandImage: `${STORYBOOK_HOST ? '/' + STORYBOOK_HOST : ''}/logo.svg`, + brandImage: '/logo.svg', // UI appBg: '#ffffff', diff --git a/public/CNAME b/public/CNAME new file mode 100644 index 00000000..1610bf7b --- /dev/null +++ b/public/CNAME @@ -0,0 +1 @@ +storybook.tetrisly.com