feat(ha): add native panel integration #23
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 and Storybook to Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Activate pinned pnpm | |
| run: corepack install | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v5 | |
| with: | |
| enablement: true | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build demo | |
| run: pnpm exec vite build --base=/navet/demo/ | |
| - name: Build Storybook | |
| run: pnpm storybook:build | |
| - name: Stage Pages artifact | |
| run: | | |
| mkdir pages | |
| mv dist pages/demo | |
| mv .cache/storybook-static pages/storybook | |
| for section in energy security tasks locks lights media settings; do | |
| mkdir -p "pages/demo/${section}" | |
| cp pages/demo/index.html "pages/demo/${section}/index.html" | |
| done | |
| printf '%s\n' \ | |
| '<!doctype html>' \ | |
| '<html lang="en">' \ | |
| ' <head>' \ | |
| ' <meta charset="utf-8">' \ | |
| ' <meta name="viewport" content="width=device-width, initial-scale=1">' \ | |
| ' <meta http-equiv="refresh" content="0; url=/navet/demo/">' \ | |
| ' <title>Navet Demo</title>' \ | |
| " <script>window.location.replace('/navet/demo/')</script>" \ | |
| ' </head>' \ | |
| ' <body>' \ | |
| ' <a href="/navet/demo/">Open the Navet demo</a>' \ | |
| ' </body>' \ | |
| '</html>' \ | |
| > pages/index.html | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: pages | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }}demo/ | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |