Skip to content

Commit

Permalink
chore(ci): fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gearonix committed Aug 20, 2023
1 parent b76dedc commit 0ca2a51
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CodeGear CI > build
on:
pull_request:
branches: [ master ]
push: null
push: [ master ]
workflow_call:

permissions:
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CodeGear CI > build
on:
pull_request:
branches: [ master ]
push: [ master ]
workflow_call:

permissions:
contents: write

jobs:
build:
uses: ./.github/workflows/build.yml
push-build:
needs: [build]
name: Pushing workflow to build branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install

- 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}"

push-storybook:
needs: [build]
name: Building and deploying storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install

- 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 }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CodeGear CI > lint
on:
pull_request:
branches: [ master ]
push: null
push: [ master ]
permissions:
contents: write

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ name: CodeGear CI > tests
on:
pull_request:
branches: [ master ]
push: null
push: [ master ]
permissions:
contents: write

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

test-storybook:
name: testing storybook
needs: [build-storybook]
Expand All @@ -23,6 +22,9 @@ jobs:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install

- name: Testing storybook in production
run: yarn dlx nx run ui:storybook:test:production
test:
Expand Down

0 comments on commit 0ca2a51

Please sign in to comment.