Repository navigation
Remove SCSS directory from distribution package #12
This file contains hidden or 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 demo | |
| # Requires Pages source set to GitHub Actions (Settings -> Pages -> Source). | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'demo/**' | |
| - 'scss/**' | |
| - 'postcss.config.mjs' | |
| - 'vite.config.demo.mjs' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - '.nvmrc' | |
| - '.github/workflows/deploy-demo.yaml' | |
| workflow_dispatch: | |
| # Let a newer deploy supersede an older one, but never cancel a run that is | |
| # already publishing — a half-finished Pages deploy is worse than a slow one. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| # The demo imports dist/css, which is no longer committed — build it first. | |
| - name: Build library | |
| run: npm run build | |
| - name: Build demo | |
| run: npm run build:demo | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: dist-demo | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-slim | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |