Skip to content

Export BlockLayout

Export BlockLayout #11

Workflow file for this run

name: build
on:
release:
types: [created]
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: npm
- uses: microbit-foundation/npm-package-versioner-action@v1
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm run ci
- name: Upload GitHub packages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./storybook-static
- run: npm publish
if: github.event_name == 'release' && github.event.action == 'created'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
deploy:
# https://github.com/actions/deploy-pages
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
needs: build
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4