fix: include no-nimble.js in GitHub Pages deployment #61
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: node build.js | |
| # Assemble _site so demo/../dist paths resolve correctly: | |
| # _site/demo/index.html → href="../dist/nimble.css" | |
| # _site/dist/nimble.css | |
| - name: Assemble site | |
| run: | | |
| mkdir -p _site/demo _site/dist | |
| cp index.html _site/ | |
| cp demo/* _site/demo/ | |
| cp dist/* _site/dist/ | |
| cp no-nimble.js _site/ | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |