mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 10:00:44 +08:00
* chore: migrate maa website * ci: change docs build test to website build test * fix: rename artifact name to dist * ci: add workflow to deploy website to azure
27 lines
614 B
JavaScript
27 lines
614 B
JavaScript
import * as fs from 'fs';
|
|
|
|
const bundleBasePath = './dist';
|
|
|
|
const maaProjectLocationMapping = [
|
|
{
|
|
from: './apps/web/dist',
|
|
to: `${bundleBasePath}`,
|
|
},
|
|
{
|
|
from: '../docs/.vuepress/dist',
|
|
to: `${bundleBasePath}/docs`,
|
|
},
|
|
];
|
|
|
|
console.log(`remove ${bundleBasePath}`);
|
|
fs.rmSync(bundleBasePath, { recursive: true, force: true });
|
|
|
|
maaProjectLocationMapping.forEach(({ from, to }) => {
|
|
if (fs.existsSync(from) === false) {
|
|
console.error(`[ERR] ${from} does not exist`);
|
|
process.exit(-1);
|
|
}
|
|
console.log(`[INF] copy ${from} to ${to}`);
|
|
fs.cpSync(from, to, { recursive: true });
|
|
});
|