diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..b851c0f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,39 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [asha-new-manipulatives-v2] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm install + - run: npm run build + - uses: actions/upload-pages-artifact@v3 + with: + path: dist + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/src/App.jsx b/src/App.jsx index ec84f22..16bdfcc 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,17 +3,17 @@ import ManipulativeCanvas from './ManipulativeCanvas.jsx' import { manipulatives } from './manipulatives/index.js' export default function App() { - const [activeId, setActiveId] = useState(manipulatives[0].id) + const [activeId, setActiveId] = useState('percent-park-designer') const active = manipulatives.find((m) => m.id === activeId) ?? manipulatives[0] const ActiveComponent = active.component return (
-