From f956b4c32976ea03206c62fe7ac1ecbf79fa5131 Mon Sep 17 00:00:00 2001 From: Mohit Date: Tue, 9 Jun 2026 12:01:09 +0100 Subject: [PATCH] ci: auto-deploy Skill Playground to GitHub Pages On push to main, rebuild web/skills.json from the SKILL.md files and publish web/ to GitHub Pages, so the live site always reflects the current skill library. Manual runs supported via workflow_dispatch. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/deploy-playground.yml | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/deploy-playground.yml diff --git a/.github/workflows/deploy-playground.yml b/.github/workflows/deploy-playground.yml new file mode 100644 index 0000000..ff3ce24 --- /dev/null +++ b/.github/workflows/deploy-playground.yml @@ -0,0 +1,58 @@ +name: Deploy Skill Playground + +# Rebuilds web/skills.json from the SKILL.md files and publishes web/ to +# GitHub Pages. Runs on every push to main that touches skills or the web app, +# so the live site always reflects the current skill library. + +on: + push: + branches: [main] + paths: + - 'skills/**' + - 'web/**' + - '.github/workflows/deploy-playground.yml' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment; cancel in-progress runs for the same ref. +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Rebuild skills.json from SKILL.md files + run: node web/build-skills.mjs + + - name: Configure Pages + uses: actions/configure-pages@v5 + + - name: Upload web/ as Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: web + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4