initial commit #4
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 Playground | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pages: write | |
| concurrency: | |
| group: playground-pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Set up Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version: 22 | |
| cache: true | |
| run-install: false | |
| - name: Install Rust toolchain | |
| run: | | |
| rustup toolchain install stable --profile minimal | |
| rustup default stable | |
| - name: Run setup task | |
| run: vp run setup --frozen-lockfile | |
| - name: Build playground | |
| env: | |
| PAGES_BASE_PATH: /${{ github.event.repository.name }}/ | |
| run: vp run playground:build | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: ./playground/dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |