mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 06:33:17 +08:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
25ae83ba65 | ||
|
ce50d1857c | ||
|
46146058b6 | ||
|
5d8f5a15f7 |
13
CHANGELOG.md
13
CHANGELOG.md
@ -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)
|
||||
|
||||
|
||||
|
@ -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
26948
lib/index.js
Normal file
File diff suppressed because it is too large
Load Diff
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "actions-github-pages",
|
||||
"version": "3.5.0",
|
||||
"version": "3.6.0-0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -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": {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user