@@ -254,6 +254,50 @@ jobs:
254254 cache-from : type=gha
255255 cache-to : type=gha,mode=max
256256
257+ deploy-playground :
258+ if : startsWith(github.ref, 'refs/tags/')
259+ runs-on : ubuntu-22.04
260+ steps :
261+ - name : Checkout
262+ uses : actions/checkout@v4
263+
264+ - name : Cache
265+ uses : Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # pin@v2
266+
267+ - name : Install wasm-pack
268+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
269+
270+ - uses : pnpm/action-setup@v2
271+ with :
272+ version : 8
273+ - uses : actions/setup-node@v3
274+ with :
275+ node-version-file : " playground/package.json"
276+ cache-dependency-path : " playground/pnpm-lock.yaml"
277+ cache : " pnpm"
278+
279+ - name : Install JS dependencies
280+ working-directory : " playground"
281+ run : pnpm install
282+
283+ - name : Build
284+ working-directory : " playground"
285+ run : pnpm build
286+
287+ - name : Deploy to Netlify
288+ uses : nwtgck/actions-netlify@v2
289+ with :
290+ publish-dir : " playground/dist"
291+ production-branch : main
292+ github-token : ${{ secrets.GITHUB_TOKEN }}
293+ deploy-message : " Deploy from GitHub Actions"
294+ fails-without-credentials : true
295+ enable-pull-request-comment : false
296+ enable-commit-comment : false
297+ env :
298+ NETLIFY_AUTH_TOKEN : ${{ secrets.PLAYGROUND_NETLIFY_AUTH_TOKEN }}
299+ NETLIFY_SITE_ID : ${{ secrets.PLAYGROUND_NETLIFY_SITE_ID }}
300+
257301 lint :
258302 needs : pre_job
259303 if : needs.pre_job.outputs.should_skip != 'true'
0 commit comments