update sizes #94
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 dev Storybook | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- design-library/** | |
- .github/workflows/design-library-deploy-storybook-dev.yml | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: | |
- main | |
paths: | |
- design-library/** | |
- .github/workflows/design-library-deploy-storybook-dev.yml | |
jobs: | |
build_and_deploy: | |
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.action != 'closed') | |
runs-on: ubuntu-latest | |
name: Build and Deploy | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: design-library/.node-version | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'pnpm' | |
cache-dependency-path: design-library/pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
working-directory: design-library | |
- name: Build Storybook | |
run: pnpm build-storybook | |
working-directory: design-library | |
- name: Deploy | |
id: builddeploy | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STORYBOOK_DEV_DEPLOY_TOKEN }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) | |
action: "upload" | |
app_location: "design-library/storybook-static" | |
skip_app_build: true | |
skip_api_build: true | |
close_pull_request: | |
if: github.event_name == 'pull_request' && github.event.action == 'closed' | |
runs-on: ubuntu-latest | |
name: Remove PR deploy | |
steps: | |
- name: Close Pull Request | |
id: closepullrequest | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STORYBOOK_DEV_DEPLOY_TOKEN }} | |
action: "close" |