Skip to content

Commit

Permalink
feat: add build on CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Apr 17, 2024
1 parent 5ffcb06 commit eba7481
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/lactame.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy build on lactame.com

on:
release:
types: [published]

env:
NODE_VERSION: 20.x

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get package name
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
- uses: actions/setup-node@v4
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
lib
lib-esm
dist

# Logs
logs
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
"lib-esm"
],
"scripts": {
"build": "npm run tsc-esm && cheminfo-build --entry lib-esm/index.js --root SGG",
"check-types": "tsc --noEmit",
"clean": "rimraf lib lib-esm",
"eslint": "eslint src",
"eslint-fix": "npm run eslint -- --fix",
"prepack": "npm run tsc",
"prettier": "prettier --check src",
"prettier-write": "prettier --write src",
"test": "npm run test-coverage && npm run eslint && npm run check-types",
"test": "npm run test-coverage && npm run eslint && npmr run prettier && npm run check-types",
"test-coverage": "jest --coverage",
"test-only": "jest",
"tsc": "npm run clean && npm run tsc-cjs && npm run tsc-esm",
Expand Down Expand Up @@ -48,7 +49,8 @@
"homepage": "https://github.com/mljs/savitzky-golay-generalized",
"devDependencies": {
"@types/jest": "^29.5.12",
"eslint": "^8.9.0",
"cheminfo-build": "^1.2.0",
"eslint": "^8.57.0",
"eslint-config-cheminfo-typescript": "^12.3.0",
"jest": "^29.7.0",
"prettier": "^3.2.5",
Expand Down

0 comments on commit eba7481

Please sign in to comment.