Compare commits

...

4 Commits

Author SHA1 Message Date
peaceiris
25ae83ba65 chore(release): 3.6.0-0 2020-03-07 06:25:48 +09:00
peaceiris
ce50d1857c chore(release): Add build assets 2020-03-07 06:25:48 +09:00
peaceiris
46146058b6 fix: Use io.cp() on windows 2020-03-07 06:19:48 +09:00
peaceiris
5d8f5a15f7 feat: Use rsync instead of io.cp() 2020-03-06 21:10:16 +00:00
6 changed files with 26985 additions and 12 deletions

View File

@ -2,6 +2,19 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
# [3.6.0-0](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.0...v3.6.0-0) (2020-03-06)
### feat
* Use rsync instead of io.cp() ([5d8f5a1](https://github.com/peaceiris/actions-gh-pages/commit/5d8f5a15f78784a868a9744f3b343232dbcbd918))
### fix
* Use io.cp() on windows ([4614605](https://github.com/peaceiris/actions-gh-pages/commit/46146058b69b014134a7d788299d643e83cc3176))
# [3.5.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.4.1...v3.5.0) (2020-03-06)

View File

@ -11,6 +11,7 @@ RUN apt-get update && \
ca-certificates \
wget \
ssh \
rsync \
vim && \
rm -rf /var/lib/apt/lists/* && \
npm i -g npm

26948
lib/index.js Normal file

File diff suppressed because it is too large Load Diff

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "actions-github-pages",
"version": "3.5.0",
"version": "3.6.0-0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "actions-github-pages",
"version": "3.5.0",
"version": "3.6.0-0",
"description": "GitHub Actions for GitHub Pages",
"main": "lib/index.js",
"engines": {

View File

@ -17,18 +17,29 @@ export async function copyAssets(
publishDir: string,
workDir: string
): Promise<void> {
const copyOpts = {recursive: true, force: true};
const files = fs.readdirSync(publishDir);
core.debug(`${files}`);
for await (const file of files) {
if (file.endsWith('.git') || file.endsWith('.github')) {
continue;
if (process.platform === 'win32') {
const copyOpts = {recursive: true, force: true};
const files = fs.readdirSync(publishDir);
core.debug(`${files}`);
for await (const file of files) {
if (file.endsWith('.git') || file.endsWith('.github')) {
continue;
}
const filePath = path.join(publishDir, file);
await io.cp(filePath, `${workDir}/`, copyOpts);
core.info(`[INFO] copy ${file}`);
}
const filePath = path.join(publishDir, file);
await io.cp(filePath, `${workDir}/`, copyOpts);
core.info(`[INFO] copy ${file}`);
} else {
await exec.exec('rsync', [
'-rptgoDv',
'--copy-links',
'--copy-dirlinks',
"--exclude='.git'",
"--exclude='.github'",
`${publishDir}/`,
`${workDir}/`
]);
}
return;
}