Skip to content

Update build.yml

Update build.yml #17

Workflow file for this run

name: Build & Publish Demo
on:
pull_request:
types: [closed]
branches: [ "master" ]
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
if_merged:
if: github.event.pull_request.merged == true
permissions:
contents: read
pages: write
id-token: write
strategy:
matrix:
include:
- platform: 'ubuntu-latest'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: |
corepack enable
yarn install
- name: Build
run: yarn bundle:demo
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: './bundle-demo'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4