fix(ci): fixed storybook build #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CodeGear CI | |
on: | |
pull_request: | |
branches: [ master ] | |
push: | |
branches: [ ci-test ] | |
permissions: | |
contents: write | |
jobs: | |
linting: | |
name: Linting project | |
runs-on: ubuntu-latest | |
steps: | |
# Node.js and yarn setup | |
- uses: actions/checkout@v3 | |
- name: Installing Node.js 19.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 19.x | |
cache: 'yarn' | |
# Installing deps | |
- name: Installing dependencies | |
run: yarn install | |
# Main rules | |
- name: Linting project | |
run: yarn run lint | |
building: | |
name: Creating a Production Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Node.js and yarn setup | |
- name: Installing Node.js 19.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 19.x | |
cache: 'yarn' | |
# Installing deps | |
- name: Installing dependencies | |
run: yarn install | |
# Main rules | |
- name: Creating a Production Build | |
run: yarn run 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}" | |
build-storybook: | |
name: Creating a Production Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Node.js and yarn setup | |
- name: Installing Node.js 19.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 19.x | |
cache: 'yarn' | |
# Installing deps | |
- name: Installing dependencies | |
run: yarn install | |
# Main rules | |
- name: Building storybook | |
run: yarn dlx nx run 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 }} |