Merge pull request #14 from jpmccu/revert-12-copilot/update-node-magn… #42
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 GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Only one concurrent deployment; cancel in-progress runs | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build core library | |
| run: npm run build --workspace=packages/core | |
| - name: Build web demo | |
| run: npm run build --workspace=packages/web | |
| - name: Build docs site | |
| run: npm run build --workspace=packages/docs | |
| - name: Copy web demo into docs output | |
| # Places the built web app at /demo/ within the Pages site so the | |
| # docs demo.html iframe can load it from /demo/index.html | |
| run: cp -r packages/web/dist/. packages/docs/dist/demo/ | |
| - name: Disable Jekyll processing | |
| # Prevents GitHub Pages from running Jekyll on the static Vite output | |
| run: touch packages/docs/dist/.nojekyll | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: packages/docs/dist | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |