docs: use placeholder names in the avatar demo #17
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 docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "materialwind/**" | |
| - "materialwind-docs/**" | |
| - ".github/workflows/deploy-docs.yml" | |
| workflow_dispatch: | |
| # Allow one concurrent deployment, and let a queued run supersede an older one. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| # Resolves base_path for this repo (e.g. /materialwind/), which the docs | |
| # build needs baked in before Vite emits asset URLs. | |
| # | |
| # `enablement: true` creates the Pages site if it is missing instead of | |
| # failing with "Get Pages site failed", so the workflow does not depend on | |
| # someone having flipped the setting by hand first. | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v5 | |
| id: pages | |
| with: | |
| enablement: true | |
| # The docs depend on the plugin through `file:../materialwind`, which npm | |
| # symlinks rather than packs -- so the plugin has to be built first or the | |
| # docs would resolve an empty dist/. | |
| - name: Build and test materialwind | |
| working-directory: materialwind | |
| run: | | |
| npm ci | |
| npm run build | |
| npm test | |
| - name: Build docs | |
| working-directory: materialwind-docs | |
| env: | |
| BASE_PATH: ${{ steps.pages.outputs.base_path }} | |
| run: | | |
| npm install | |
| npm run build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: materialwind-docs/dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment |