Publish data-grid storybook #15
Workflow file for this run
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: Publish data-grid storybook | |
on: | |
workflow_dispatch: | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
jobs: | |
setup: | |
uses: equinor/design-system/.github/workflows/_setup.yml@develop | |
secrets: inherit | |
with: | |
cacheKey: ${{ github.sha }} | |
checkout_paths: packages/eds-core-react packages/eds-tokens packages/eds-icons packages/eds-lab-react packages/eds-data-grid-react packages/eds-utils | |
packages: | |
name: Process packages | |
runs-on: ubuntu-latest | |
needs: [setup] | |
steps: | |
- name: Use "setup" cache | |
id: get-setup-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./* | |
~/.pnpm-store | |
key: ${{ github.sha }} | |
- name: Use "dist" cache | |
id: use-dist-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./* | |
~/.pnpm-store | |
key: ${{ github.sha }}-dist-production-data-grid-storybook | |
- name: Build packages | |
id: build-packages | |
run: node_modules/.bin/pnpm run build | |
- name: Build Storybook | |
id: build-storybook | |
run: | | |
echo Running build:storybook:data-grid! | |
node_modules/.bin/pnpm build:storybook:data-grid | |
publish-storybook: | |
needs: [setup, packages] | |
name: Build & Deploy Website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Use cache with storybook files | |
id: use-cache-storybook | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./* | |
~/.pnpm-store | |
key: ${{ github.sha }}-dist-production-data-grid-storybook | |
- name: Deploy the website | |
id: deploy-website | |
uses: tibor19/static-website-deploy@v2 | |
with: | |
enabled-static-website: 'true' | |
remove-existing-files: 'true' | |
folder: 'packages/eds-data-grid-react/storybook-build' | |
public-access-policy: 'container' | |
connection-string: ${{ secrets.AZ_STORAGE_STORYBOOK_DATAGRID_CONNECTION_STRING }} | |
- name: log-errors-to-slack | |
uses: act10ns/slack@v2 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
if: failure() |