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 ec22514 commit d3e124a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: yarn install

- name: Creating a Production Build
run: yarn dlx nx run root:build
run: nx run root:build

- name: Pushing to build branch
uses: s0/git-publish-subdir-action@develop
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: code-gear > lint
on:
pull_request:
branches:
- master
- ci-testing
push:
branches:
- master
- ci-testing
permissions:
contents: write

jobs:
lint:
name: Linting project
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: Linting project
run: nx run root:lint
4 changes: 2 additions & 2 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: yarn install

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

- name: Pushing to build-storybook branch
uses: JamesIves/github-pages-deploy-action@v4
Expand All @@ -62,4 +62,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Testing storybook in production
run: yarn dlx nx run web-ui:storybook:test:production
run: run web-ui:storybook:test:production
4 changes: 2 additions & 2 deletions packages/web/ui/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
"storybook:test:development": {
"executor": "nx:run-commands",
"options": {
"command": "test-storybook -c packages/web/ui/.storybook --url=http://localhost:4400 --watch"
"command": "test-storybook -c packages/web/ui/.config/storybook --url=http://localhost:4400 --watch"
}
},
"storybook:test:production": {
"executor": "nx:run-commands",
"options": {
"command": "test-storybook -c packages/web/ui/.storybook --url=https://gearonix.github.io/code-gear"
"command": "test-storybook -c packages/web/ui/.config/storybook --url=https://gearonix.github.io/code-gear"
}
},
"storybook:preview": {
Expand Down

0 comments on commit d3e124a

Please sign in to comment.