Skip to content

Commit

Permalink
add missing scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Dec 17, 2024
1 parent 0d098cd commit ca523db
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,34 @@ jobs:
- name: Install Dependencies
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Install jq
if: matrix.package == 'gui'
run: sudo apt-get update && sudo apt-get install -y jq

- name: Get package version (GUI)
if: matrix.package == 'gui'
id: get_version
run: |
VERSION=$(jq -r '.version' ./apps/gui/package.json)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Prepare Directories (GUI)
if: matrix.package == 'gui'
run: |
VERSION=${{ env.VERSION }}
echo "Deploying version $VERSION"
ssh -i ${{ secrets.GUI_SSH_KEY }} -o StrictHostKeyChecking=no ${{ secrets.GUI_HOST_USER }}@${{ secrets.GUI_HOST_IP }} << EOF
set -e
mkdir -p /var/www/${VERSION}
rm -rf /var/www/html/
ln -s /var/www/${VERSION} /var/www/html
EOF
- name: Upload Build (GUI)
if: matrix.package == 'gui'
run: |
scp -i ${{ secrets.GUI_SSH_KEY }} -o StrictHostKeyChecking=no -r ./apps/gui/dist/* ${{ secrets.GUI_HOST_USER }}@${{ secrets.GUI_HOST_IP }}:/var/www/html/${{ env.VERSION }}
- name: Find Package
id: find_package
run: |
Expand Down
4 changes: 3 additions & 1 deletion libraries/worker-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"author": "Kieran",
"license": "MIT",
"scripts": {
"build": "rm -rf dist && tsc && pnpm run copy:wasm && pnpm run build:esm",
"clean": "rm -rf dist",
"tsc": "tsc",
"build": "pnpm clean && pnpm tsc && pnpm run copy:wasm && pnpm run build:esm",
"build:esm": "esbuild src/worker.ts --bundle --minify --sourcemap --outdir=dist/esm --format=esm --out-extension:.js=.mjs --loader:.wasm=copy --watch",
"copy:wasm": "cp src/sqlite/sqlite3.wasm dist/sqlite/sqlite3.wasm"
},
Expand Down

0 comments on commit ca523db

Please sign in to comment.