name: Playground
on:
release:
types: [created]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
deploy-playground:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Git describe
id: ghd
uses: proudust/gh-describe@v1
- run: npm ci
- name: Build
run: |
cd playground
npx vite build --base=/cooklang-rs/
env:
BUILD_COOKLANG_RS_VERSION: ${{ steps.ghd.outputs.describe }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./playground/dist