mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2026-10-03 01:51:37 +00:00
fix: Replace io.rmRF with shelljs.rm
This commit is contained in:
1 file changed
+3
-4
+3
-4
@@ -1,12 +1,11 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
import * as io from '@actions/io';
|
|
||||||
import * as glob from '@actions/glob';
|
import * as glob from '@actions/glob';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import {Inputs, CmdResult} from './interfaces';
|
import {Inputs, CmdResult} from './interfaces';
|
||||||
import {createDir} from './utils';
|
import {createDir} from './utils';
|
||||||
import {cp, ls} from 'shelljs';
|
import {cp, rm, ls} from 'shelljs';
|
||||||
|
|
||||||
export async function createBranchForce(branch: string): Promise<void> {
|
export async function createBranchForce(branch: string): Promise<void> {
|
||||||
await exec.exec('git', ['init']);
|
await exec.exec('git', ['init']);
|
||||||
@@ -27,7 +26,7 @@ export async function deleteExcludedAssets(destDir: string, excludeAssets: strin
|
|||||||
const globber = await glob.create(excludedAssetPaths.join('\n'));
|
const globber = await glob.create(excludedAssetPaths.join('\n'));
|
||||||
for await (const asset of globber.globGenerator()) {
|
for await (const asset of globber.globGenerator()) {
|
||||||
core.info(`[INFO] delete ${asset}`);
|
core.info(`[INFO] delete ${asset}`);
|
||||||
io.rmRF(asset);
|
rm('-rf', asset);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -42,7 +41,7 @@ export async function copyAssets(
|
|||||||
const dotGitPath = path.join(publishDir, '.git');
|
const dotGitPath = path.join(publishDir, '.git');
|
||||||
if (fs.existsSync(dotGitPath)) {
|
if (fs.existsSync(dotGitPath)) {
|
||||||
core.info(`[INFO] delete ${dotGitPath}`);
|
core.info(`[INFO] delete ${dotGitPath}`);
|
||||||
io.rmRF(dotGitPath);
|
rm('-rf', dotGitPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(ls('-A', publishDir));
|
console.log(ls('-A', publishDir));
|
||||||
|
|||||||
Reference in new issue
Block a user