Skip to content

Commit

Permalink
fix: copy directories #89
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Feb 5, 2020
1 parent d35854b commit 6edc4c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
17 changes: 6 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@actions/core": "^1.2.2",
"@actions/exec": "^1.0.3",
"@actions/github": "^2.1.0",
"@actions/glob": "^0.1.0",
"@actions/io": "^1.0.2"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/git-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as github from '@actions/github';
import * as io from '@actions/io';
import * as glob from '@actions/glob';
import path from 'path';
import fs from 'fs';
import {Inputs, CmdResult} from './interfaces';
import {getHomeDir} from './utils';

Expand All @@ -24,8 +24,8 @@ export async function copyAssets(
workDir: string
): Promise<void> {
const copyOpts = {recursive: true, force: false};
const globber = await glob.create(`${publishDir}/*`);
for await (const file of globber.globGenerator()) {
const files = fs.readdirSync(publishDir);
for await (const file of files) {
if (file.endsWith('.git') || file.endsWith('.github')) {
continue;
}
Expand Down

0 comments on commit 6edc4c9

Please sign in to comment.