From a09bf753b4fdd84ca896a25d0e2f8809fb773c76 Mon Sep 17 00:00:00 2001 From: Koh Wei Jie Date: Thu, 3 Aug 2023 16:27:45 +0800 Subject: [PATCH] tweaked workflow --- .github/workflows/publish.yml | 18 ++++++++++++------ web/package.json | 3 +++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f6235b0..5460535 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: NodeJS with Gulp +name: NodeJS with Parcel on: push: @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 @@ -22,8 +22,14 @@ jobs: with: node-version: ${{ matrix.node-version }} + - name: npm install + run: cd web && npm install + - name: Build - run: | - cd web - npm install - npx parcel index.html + run: cd web && npx parcel build --public-url ./ index.html + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./web/dist/ diff --git a/web/package.json b/web/package.json index 7fa6209..32c12c7 100644 --- a/web/package.json +++ b/web/package.json @@ -7,6 +7,9 @@ }, "author": "Koh Wei Jie", "license": "MIT", + "alias": { + "events": false + }, "dependencies": { "circomlibjs": "^0.1.7", "ffjavascript": "^0.2.45"