Skip to content

Commit

Permalink
ci: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gearonix committed Oct 6, 2023
1 parent 515d485 commit b012de6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 225 deletions.
13 changes: 2 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@ const grnx = require('@grnx-utils/eslint')
module.exports = grnx({
root: __dirname,
tsconfig: 'tsconfig.base.json',
// monorepo: true,
ignore: [
'dist',
'node_modules',
'.idea',
'.yarn',
'build',
'tmp',
'coverage'
],
ext: {
'import/export': 'off'
'import/export': 'off',
'max-len': 'off'
}
})
46 changes: 8 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,42 +53,12 @@ jobs:

- name: Creating a Production Build
run: yarn dlx nx run root:build
build-storybook:
name: Building and deploying storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'master'

- run: |
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
- name: Installing Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.8.0

- name: Cache Yarn dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/yarn
~/.yarn/cache
.yarn/cache
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Installing dependencies
run: yarn install

- name: Building storybook
run: yarn dlx nx run web-ui:storybook:build
- name: Pushing to build branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: build
FOLDER: dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build: ({sha}) {msg}"
109 changes: 0 additions & 109 deletions .github/workflows/deploy.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/lint.yml

This file was deleted.

25 changes: 14 additions & 11 deletions .github/workflows/tests.yml → .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: code-gear > tests
name: code-gear > storybook
on:
pull_request:
branches:
Expand All @@ -8,16 +8,14 @@ on:
branches:
- master
- ci-testing
workflow_call:

permissions:
contents: write

jobs:
build-storybook:
uses: ./.github/workflows/build.yml
test-storybook:

name: testing storybook
needs: [build-storybook]
name: Building, testing and deploying storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -53,10 +51,15 @@ jobs:
- name: Installing dependencies
run: yarn install

- name: Building storybook
run: yarn dlx nx run web-ui:storybook:build

- name: Pushing to build-storybook branch
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist/storybook/ui
branch: storybook-build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Testing storybook in production
run: yarn dlx nx run ui:storybook:test:production
# test:
# name: testing project
# runs-on: ubuntu-latest
# steps:
run: yarn dlx nx run web-ui:storybook:test:production
4 changes: 2 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint",
"test",
"e2e",
"build-storybook"
"storybook:build"
],
"accessToken": "MDYwYjBjOTMtZjZhMi00YmVkLTg2MmMtZjgwNmI0OGFiNmRkfHJlYWQtd3JpdGU="
}
Expand Down Expand Up @@ -50,7 +50,7 @@
"{workspaceRoot}/.eslintignore"
]
},
"build-storybook": {
"storybook:build": {
"inputs": [
"default",
"^production",
Expand Down

0 comments on commit b012de6

Please sign in to comment.