diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3837a14 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build and Deploy + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Install dependencies + run: npm ci + - name: Build app + run: npm run build + - name: Deploy to GitHub Pages + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist diff --git a/package.json b/package.json index 9b85b3c..469531b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,9 @@ "name": "@emfcamp/emf-grist-widgets", "version": "0.0.4", "description": "A repository of grist custom widgets that have no back-end requirements.", - "scripts": {}, + "scripts": { + "build": "vite build" + }, "type": "module", "devDependencies": { "prettier": "^3.2.5",