Skip to content

fix: login type fields in login form [skip_storybook] #267

fix: login type fields in login form [skip_storybook]

fix: login type fields in login form [skip_storybook] #267

Workflow file for this run

name: Hawa CI - @beta
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_PUBLISH_TAG: next # Specify the tag for publishing (make sure to change it in the append -beta as well)
NODE_VERSION: "21.x"
PM2_PATH: /www/server/nvm/versions/node/v20.11.0/bin/pm2
PNPM_PATH: /www/server/nodejs/v20.11.0/bin/pnpm
PROJECT_PATH: /var/www/html/a01-runner/_work/Hawa/Hawa
STORYBOOK_DOMAIN: storybook.hawa.style
STORYBOOK_SERVER_DIR: hawa-storybook
STORYBOOK_PM2: hawa-storybook
DOCS_DOMAIN: hawa.style
DOCS_SERVER_DIR: hawa-docs
DOCS_PM2: hawa-docs
on:
push:
branches: [main]
paths:
- "apps/docs/**"
- "packages/storybook/**"
- "packages/components/**"
jobs:
check_changes:
runs-on: [self-hosted, linux, x64, A01]
name: "Detecting Changes"
outputs:
storybook_changed: ${{ steps.filter.outputs.storybook }}
docs_changed: ${{ steps.filter.outputs.docs }}
package_changed: ${{ steps.filter.outputs.publish-package }}
steps:
- uses: actions/checkout@v4
with:
clean: false
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
publish-package:
- "packages/components/**"
storybook:
- "packages/storybook/**"
- "packages/components/**"
docs:
- "apps/docs/**"
# =====================================================================================
# ============================= HAWA STORYBOOK ========================================
# =====================================================================================
storybook:
needs: check_changes
name: "Deploy Storybook"
if: ${{ !contains(github.event.head_commit.message, 'skip_storybook') && needs.check_changes.outputs.storybook_changed == 'true' }}
runs-on: [self-hosted, linux, x64, A01]
steps:
- uses: actions/checkout@v4
with:
clean: false
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies and Build ${{env.STORYBOOK_PM2}}
run: |
pnpm install
pnpm build:lib
cd packages/storybook
npm run build-storybook
# - name: Link to Production and Restart with PM2
# run: |
# cd frontend/pukla-portal
# if pm2 list | grep -q ${{env.PUKLA_PM2}}; then
# pm2 restart ${{env.PUKLA_PM2}}
# else
# pm2 start npm --name ${{env.PUKLA_PM2}} -- run start
# fi
# pm2 save
- name: Display Deployment URL
run: echo "Hawa Storybook deployed successfully at https://${{ env.STORYBOOK_DOMAIN }}"
# =====================================================================================
# ============================= HAWA DOCS =============================================
# =====================================================================================
docs:
if: ${{ contains(github.event.head_commit.message, 'deploy_docs') && needs.check_changes.outputs.docs_changed == 'true' }}
needs: check_changes
name: "Deploy Docs"
runs-on: [self-hosted, linux, x64, A01]
steps:
- uses: actions/checkout@v4
with:
clean: false
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies and Build beta-user-portal
run: |
pnpm install --filter hawa-docs
cd apps/docs
npm run sync:changelog
npm run build
- name: Link to Production and Restart with PM2
run: |
cd apps/docs
if pm2 list | grep -q ${{env.DOCS_PM2}}; then
pm2 restart ${{env.DOCS_PM2}}
else
pm2 start npm --name ${{env.DOCS_PM2}} -- run start
fi
pm2 save
- name: Display Deployment URL
run: echo "Hawa docs deployed successfully at https://${{ env.DOCS_DOMAIN }}"
# =====================================================================================
# ============================= HAWA NPM ==============================================
# =====================================================================================
publish-package:
if: ${{ !contains(github.event.head_commit.message, 'skip_publish') }}
runs-on: [self-hosted, linux, x64, A01]
steps:
- uses: actions/checkout@v4
- name: Append -next to package.json version
run: |
node -e "const fs = require('fs'); const packageJson = require('./packages/components/package.json'); packageJson.version += '-next'; fs.writeFileSync('./packages/components/package.json', JSON.stringify(packageJson, null, 2));"
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v2
with:
version: 8.14.0
run_install: false
- name: Install dependencies
run: pnpm install
- name: Build Library
run: pnpm run build:lib
- name: Publish to NPM @next tag
run: pnpm --filter @sikka/hawa publish --no-git-checks --tag $NPM_PUBLISH_TAG # Specify the tag here