Skip to content

Commit

Permalink
ci: Add update-playground action
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Feb 25, 2024
1 parent bd39d4f commit 09b0387
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/update-playground.yml
@@ -0,0 +1,37 @@
name: Update playground

on:
- workflow_dispatch

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with: { submodules: true }
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- run: npm run build:browser
- name: Playground setup
working-directory: ./playground
run: npm ci
- name: Playground build
working-directory: ./playground
run: npm run build

- uses: actions/checkout@v4
with:
repository: eemeli/yaml-playground
ref: gh-pages
path: ./gh-pages
- run: rm gh-pages/*
- run: cp playground/site/* gh-pages/

- name: git config
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- run: git add . && git commit -m 'Update playground' && git push
working-directory: ./gh-pages
2 changes: 1 addition & 1 deletion playground

0 comments on commit 09b0387

Please sign in to comment.