add missing docs to demos publish workflow #15
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 Demos on GH Pages | |
| on: | |
| push: | |
| branches: | |
| - demos-redesign | |
| # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: true | |
| jobs: | |
| # Single deploy job since we're just deploying | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy_to_pages.outputs.github_pages_url }} | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./examples | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.19.3 | |
| cache: 'npm' | |
| cache-dependency-path: examples/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| env: | |
| VITE_FREESOUND_API_KEY: ${{ secrets.FREESOUND_API_KEY }} | |
| # move ./examples/dist to ./examples/ (overwrite) | |
| - name: Move dist to examples root | |
| run: | | |
| shopt -s extglob | |
| rm -rf !(dist) | |
| mv -f ./dist/* ./ | |
| rmdir ./dist || true | |
| - name: Erase everything but examples and readme on working dir | |
| working-directory: ./ | |
| run: | | |
| shopt -s extglob | |
| rm -fr !(README.md|examples|docs) | |
| - name: Deploy 🚀 | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: "." # The folder the action should deploy. |