added langauge switcher in storybook + other improvements #410
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
name: Hawa Build, Deploy, and Publish on Push | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js v16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: | | |
if [ -e 'package-lock.json' ]; then | |
npm ci | |
else | |
npm install | |
fi | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
# # Deployment job | |
# deploy: | |
# runs-on: ubuntu-latest | |
# environment: | |
# name: github-pages | |
# url: ${{ steps.deployment.outputs.page_url }} | |
# needs: build | |
# steps: | |
# - name: Deploy to GitHub Pages | |
# id: deployment | |
# uses: actions/deploy-pages@v2 | |
# # with: | |
# # branch: gh-pages | |
# # folder: docs | |
# # - name: Deploy to GitHub Pages | |
# # id: deployment | |
# # uses: actions/deploy-pages@v2 | |
# Publishing to NPM | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js v16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: | | |
if [ -e 'package-lock.json' ]; then | |
npm ci | |
else | |
npm install | |
fi | |
- name: Build Library | |
run: npm run build-lib | |
- name: Build Styles | |
run: npm run build:styles | |
- name: Generate Tailwind Styles | |
run: npm run generate-css | |
- name: Publish to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |