Skip to content

Commit

Permalink
fix(pwa): generate report
Browse files Browse the repository at this point in the history
  • Loading branch information
teomrd committed Nov 8, 2024
1 parent 90a84cb commit 65fbeb8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lighhouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Audit MiroPad with Lighthouse
on:
push:
branches:
- lighthouse
jobs:
build-and-audit:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- run: make build
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install -g @lhci/[email protected]
- run: lhci autorun
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as esbuild from "npm:esbuild";

const VERSION = Deno.env.get("NEW_VERSION")
const VERSION = Deno.env.get("NEW_VERSION") || `v0.0.0`;

const result = await esbuild.build({
entryPoints: ["./src/index.ts"],
Expand Down
6 changes: 4 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/bin/bash

echo -e "🛠️ Building ${COLOR_GREEN}MiroPad${NO_COLOR} ${COLOR_RED}${NEW_VERSION}${NO_COLOR} \n"
version="${NEW_VERSION:-"v0.0.0"}"

echo -e "🛠️ Building ${COLOR_GREEN}MiroPad${NO_COLOR} ${COLOR_RED}${version}${NO_COLOR} \n"

mkdir -p ./dist

cp ./src/manifest.json ./dist
cp ./static/favicon.ico ./dist
cp ./src/service-worker.js ./dist

echo "$NEW_VERSION" >./dist/version
echo "$version" >./dist/version

cp -r ./src/assets/images ./dist/images

Expand Down

0 comments on commit 65fbeb8

Please sign in to comment.