Merge pull request #52 from renovate-bot/renovate/npm-run-all-replace… #26
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
# Use Vercel CLI to use `npm run publish-storybook` to deploy to Vercel | |
name: CD workflow | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
init: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: deps-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8.15.5 | |
run_install: false | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: pnpm install | |
# Build Storybook | |
- name: Build Storybook | |
run: npm run build-storybook | |
# Deploy to Vercel | |
- name: Deploy to Vercel | |
uses: amondnet/vercel-action@v25 #deploy | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required | |
github-token: ${{ secrets.GIT_TOKEN }} #Optional | |
vercel-args: '--prod' #Optional | |
vercel-org-id: ${{ secrets.ORG_ID}} #Required | |
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required | |
working-directory: ./ |