Skip to content

Commit

Permalink
save artifact to lighthouse-public dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeigs committed Jan 24, 2024
1 parent fda0081 commit e86f5a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test-lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ jobs:
run: |
npm ci --legacy-peer-deps
npm run build
- name: Save Artifacts
uses: actions/upload-artifact@v4
with:
name: lighthouse-public
path: |
public
9 changes: 0 additions & 9 deletions src/init/DocumentDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,9 @@ class ManifestDocumentDatabase {
async getDocuments() {
const result = [];
if (!this.path.includes('.zip')) {
console.log('looking for documents from file');
const documents = JSON.parse(fs.readFileSync('snooty-documents.json'));
console.log('DOCUMENTS found in snooty-documents.json', documents.length);
return documents;
} else {
console.log('sadly still using zip for documents');
const zipEntries = this.zip.getEntries();
for (const entry of zipEntries) {
if (entry.entryName.startsWith('documents/')) {
Expand All @@ -85,14 +82,8 @@ class ManifestDocumentDatabase {
async getAsset(checksum) {
console.log('getting assets');
if (!this.zip) {
console.log('looking for assets from file');
const assets = JSON.parse(fs.readFileSync('snooty-assets.json'));
console.log('DOCUMENTS found in snooty-assets.json', Object.keys(assets));
console.log('checksum ', checksum);
// const assetData = assets.assetData;
// console.log('assetData info ', Object.keys(assetData));
const asset = assets[checksum];
console.log('is this asset around? ', asset);
return asset.assetData;
}
const result = this.zip.getEntry(`assets/${checksum}`);
Expand Down

0 comments on commit e86f5a6

Please sign in to comment.