Skip to content

Commit

Permalink
feat: histoire build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anwarulislam committed Dec 1, 2023
1 parent d4b771c commit 6ba0afd
Show file tree
Hide file tree
Showing 3 changed files with 7,775 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy to Netlify (ui)

on:
push:
branches: [main]
# run this workflow only if an update is made to the ui package
workflow_dispatch:

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 9
run_install: true

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: pnpm

- name: Build site
run: pnpm run story:build

# Deploy the ui site with netlify-cli
- name: Deploy to Netlify (ui)
run: npx [email protected] deploy --dir=.histoire/dist --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"build": "vite build",
"story:build": "histoire build",
"story:preview": "histoire preview",
"do-build-prod": "pnpm run build",
"postinstall": "pnpm run build",
"do-build-ui": "pnpm run story:build"
"postinstall": "pnpm run build"
},
"peerDependencies": {
"vue": "^3.2.25"
Expand Down
Loading

0 comments on commit 6ba0afd

Please sign in to comment.