Skip to content

Commit 19a34c2

Browse files
committed
fix: publish gh-pages with achived versions
1 parent f560389 commit 19a34c2

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

bin/gh-pages.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@ async function copyFiles() {
1212
archivedData[version] = Date.now();
1313
await fs.writeJson(archiveMetaFile, archivedData);
1414
console.log('successfully archived!');
15+
ghpages.publish(
16+
'./dist/toppy-app',
17+
{
18+
repo: 'https://' + process.env.GH_TOKEN + '@github.com/lokesh-coder/toppy.git'
19+
},
20+
function(err) {
21+
if (err) {
22+
console.log('Error occured during gh pages push', err);
23+
} else {
24+
console.log('Pushed to ghpages!');
25+
}
26+
}
27+
);
1528
} catch (err) {
1629
console.error(err);
1730
}
1831
}
1932

2033
copyFiles();
21-
22-
ghpages.publish(
23-
'./dist/toppy-app',
24-
{
25-
repo: 'https://' + process.env.GH_TOKEN + '@github.com/lokesh-coder/toppy.git',
26-
silent: true,
27-
add: true
28-
},
29-
function(err) {
30-
console.error('Error occured during gh pages push', err);
31-
}
32-
);

0 commit comments

Comments
 (0)