feat: histoire build workflow #2
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: 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: 8 | |
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 }} |