Merge pull request #261 from Anu3ev/working-tree #98
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: | |
| - master | |
| paths: | |
| - 'demo/**' | |
| - 'package.json' | |
| - 'vite.config.docs.js' | |
| permissions: | |
| pages: write | |
| contents: read | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install deps | |
| run: npm ci | |
| - name: Build demo | |
| run: npm run build:docs | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs | |
| - name: List build contents | |
| run: | | |
| echo "Contents of docs:" | |
| ls -la docs/ | |
| echo "Contents of docs/js:" | |
| ls -la docs/js/ || echo "js folder not found" | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| 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@v4 |