Merge pull request #425 from paypal/feature/DTPPCPSDK-1482v2 #142
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 Storybook to Github Pages" | |
on: | |
push: | |
branches: | |
- main | |
paths: ["src/**", ".storybook/**", "README.md"] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{github.event.pull_request.head.sha}} | |
fetch-depth: 0 | |
- name: 🤝 Set Node version from .nvmrc | |
run: echo NVMRC=`cat .nvmrc` >> $GITHUB_ENV | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NVMRC }} | |
- name: 📥 Download deps | |
uses: bahmutov/npm-install@v1 | |
with: | |
useLockFile: false | |
- name: ▶️ Deploy Storybook | |
run: npm run deploy-storybook -- --ci | |
env: | |
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} |