diff --git a/.github/workflows/lactame.yml b/.github/workflows/lactame.yml new file mode 100644 index 000000000..5f2b5b656 --- /dev/null +++ b/.github/workflows/lactame.yml @@ -0,0 +1,30 @@ +name: Deploy build on lactame.com + +on: + workflow_dispatch: + release: + types: [published] + +env: + NODE_VERSION: 20.x + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get package name + run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV + - uses: actions/setup-node@v2 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Install dependencies + run: npm install + - name: Build project + run: npm run build + - name: Deploy to lactame.com + uses: zakodium/lactame-action@v1 + with: + token: ${{ secrets.LACTAME_TOKEN }} + name: ${{ env.PACKAGE_NAME }} + folder: dist diff --git a/.gitignore b/.gitignore index 26c6b31da..9ccb3555c 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,5 @@ scripts/**/**.png scripts/**/**.json private + +dist \ No newline at end of file diff --git a/package.json b/package.json index 14219bc21..f71ce278a 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ }, "scripts": { "api-extractor": "rimraf dist-types && api-extractor run --local", + "build": "npm run tsc-esm && cheminfo-build --entry lib-esm/index.js --root IJS", "check-types": "tsc --noEmit", "clean": "rimraf lib lib-esm", "demo": "vite --open", @@ -67,8 +68,8 @@ "@microsoft/api-extractor": "^7.36.3", "@tailwindcss/forms": "^0.5.4", "@types/jest": "^29.5.3", - "@types/js-priority-queue": "^0.0.6", "@types/jest-image-snapshot": "^6.2.0", + "@types/js-priority-queue": "^0.0.6", "@types/node": "^20.4.8", "@types/picomatch": "^2.3.0", "@types/react": "^18.2.18", @@ -76,6 +77,7 @@ "@types/robust-point-in-polygon": "^1.0.2", "@vitejs/plugin-react": "^4.0.4", "autoprefixer": "^10.4.14", + "cheminfo-build": "^1.2.0", "clsx": "^2.0.0", "cross-env": "^7.0.3", "eslint": "^8.46.0",