Skip to content

Commit

Permalink
chore: update publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Jan 23, 2024
1 parent 4dbb721 commit 29dee2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ node_modules
.env
.env.*
!.env.example
docs/
docs/
/.publish
4 changes: 2 additions & 2 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const GIT_URL = 'git@github.com:tanhauhau/tanhauhau.github.io.git';
const __dirname = dirname(fileURLToPath(import.meta.url));

(async function () {
const cacheFolder = path.join(homedir(), '.cache/tanlihau');
const cacheFolder = path.join(__dirname, '../.publish/tanlihau');
const outputFolder = path.join(__dirname, '../docs');
if (!(await fs.exists(cacheFolder))) {
await fs.mkdirp(cacheFolder);
Expand All @@ -27,7 +27,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
exec('git fetch origin master');
exec('git reset --hard origin/master');

exec('git rm -r .');
exec('git rm -rf .');

const files = await fs.readdir(outputFolder);
for (const file of files) {
Expand Down

0 comments on commit 29dee2d

Please sign in to comment.