Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WUC: Deploy Storybook #28

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,46 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release

deploy:
Uzhastin-Nikita marked this conversation as resolved.
Show resolved Hide resolved
name: Deploy a new components for storybook
Uzhastin-Nikita marked this conversation as resolved.
Show resolved Hide resolved
needs: [test-lint, test-build, pre_ci]
timeout-minutes: 5
if: ${{ github.ref == 'refs/heads/master' }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16

- name: Manage cache
uses: actions/[email protected]
with:
path: |
./node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('.github/workflows/*.yml') }}
restore-keys: |
${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
${{ runner.OS }}-build

- name: Prepare token
run: echo "//npm.pkg.github.com/:_authToken=${GH_TOKEN}" >> .npmrc
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Build project
run: npm run build
Uzhastin-Nikita marked this conversation as resolved.
Show resolved Hide resolved

- name: Deploy storybook
run: npm run deploy-storybook

- name: Semantic release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
Uzhastin-Nikita marked this conversation as resolved.
Show resolved Hide resolved