Compare commits

..

3 Commits

Author SHA1 Message Date
peaceiris
1ae6236e8b chore(release): 3.5.0-0
Some checks failed
Release / release (push) Has been cancelled
2020-03-07 05:14:37 +09:00
peaceiris
19d5025674 chore(release): Add build assets 2020-03-07 05:14:36 +09:00
peaceiris
1fff2ca84a feat: Add enable_jekyll 2020-03-06 20:03:19 +00:00
7 changed files with 34 additions and 92 deletions

View File

@@ -2,36 +2,6 @@
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)
### deps
* bump node 12.15.0 to 12.16.1 (#142) ([ade8887](https://github.com/peaceiris/actions-gh-pages/commit/ade88874791f5b67d0c475d6dffb5219ed4407f1)), closes [#142](https://github.com/peaceiris/actions-gh-pages/issues/142)
### docs
* improve description of enable_jekyll=disable_nojekyll (see #130) (#132) ([b76751b](https://github.com/peaceiris/actions-gh-pages/commit/b76751b9eefaaf771ce31d8ef3c69a8d907f535d)), closes [#130](https://github.com/peaceiris/actions-gh-pages/issues/130) [#132](https://github.com/peaceiris/actions-gh-pages/issues/132) [#130](https://github.com/peaceiris/actions-gh-pages/issues/130)
### feat
* Add enable_jekyll (#143) ([dc1169c](https://github.com/peaceiris/actions-gh-pages/commit/dc1169c5baf9ed1205d6f0f9c9ce0e6d26afb164)), closes [#143](https://github.com/peaceiris/actions-gh-pages/issues/143) [#130](https://github.com/peaceiris/actions-gh-pages/issues/130) [#132](https://github.com/peaceiris/actions-gh-pages/issues/132)
# [3.5.0-0](https://github.com/peaceiris/actions-gh-pages/compare/v3.4.1...v3.5.0-0) (2020-03-06)

View File

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

View File

@@ -67,7 +67,7 @@ Three tokens are supported.
- [⭐️ `deploy_key`](#%EF%B8%8F-deploy_key)
- [⭐️ `personal_token`](#%EF%B8%8F-personal_token)
- [⭐️ CNAME](#%EF%B8%8F-cname)
- [⭐️ Enable Jekyll](#%EF%B8%8F-enable-jekyll)
- [⭐️ Disable `.nojekyll`](#%EF%B8%8F-disable-nojekyll)
- [⭐️ Allow empty commits](#%EF%B8%8F-allow-empty-commits)
- [⭐️ Keeping existing files](#%EF%B8%8F-keeping-existing-files)
- [⭐️ Deploy to external repository](#%EF%B8%8F-deploy-to-external-repository)
@@ -231,14 +231,11 @@ For more details about `CNAME`, read the official documentation: [Managing a cus
cname: github.com
```
### ⭐️ Enable Jekyll
### ⭐️ Disable `.nojekyll`
If you want GitHub Pages to process the site with the static site generator Jekyll, set `enable_jekyll` to true.
By default, this action signals to GitHub Pages that the site shall not be processed with Jekyll. This is done by adding an empty `.nojekyll` file when publishing to the master or gh-pages branch. When a `.nojekyll` file already exists, this action does nothing.
Bypassing Jekyll makes the deployment faster and is necessary if you are deploying files or directories that start with underscores, since Jekyll considers these to be special resources and does not copy them to the final site. You only need to set `enable_jekyll` to true when you want to deploy a Jekyll-powered website and let GitHub Pages do the Jekyll processing.
By default, this action adds the `.nojekyll` file to only the `master` and `gh-pages` branches. When the file already exists, this action does nothing.
To disable this behavior, we can set the `disable_nojekyll` option to `true`.
```yaml
- name: Deploy
@@ -246,7 +243,7 @@ Bypassing Jekyll makes the deployment faster and is necessary if you are deployi
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
enable_jekyll: true
disable_nojekyll: true
```
For more details about `.nojekyll`: [Bypassing Jekyll on GitHub Pages - The GitHub Blog](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/)

View File

@@ -8435,39 +8435,26 @@ exports.createBranchForce = createBranchForce;
function copyAssets(publishDir, workDir) {
var e_1, _a;
return __awaiter(this, void 0, void 0, function* () {
if (process.platform === 'win32') {
const copyOpts = { recursive: true, force: true };
const files = fs_1.default.readdirSync(publishDir);
core.debug(`${files}`);
try {
for (var files_1 = __asyncValues(files), files_1_1; files_1_1 = yield files_1.next(), !files_1_1.done;) {
const file = files_1_1.value;
if (file.endsWith('.git') || file.endsWith('.github')) {
continue;
}
const filePath = path_1.default.join(publishDir, file);
yield io.cp(filePath, `${workDir}/`, copyOpts);
core.info(`[INFO] copy ${file}`);
const copyOpts = { recursive: true, force: true };
const files = fs_1.default.readdirSync(publishDir);
core.debug(`${files}`);
try {
for (var files_1 = __asyncValues(files), files_1_1; files_1_1 = yield files_1.next(), !files_1_1.done;) {
const file = files_1_1.value;
if (file.endsWith('.git') || file.endsWith('.github')) {
continue;
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (files_1_1 && !files_1_1.done && (_a = files_1.return)) yield _a.call(files_1);
}
finally { if (e_1) throw e_1.error; }
const filePath = path_1.default.join(publishDir, file);
yield io.cp(filePath, `${workDir}/`, copyOpts);
core.info(`[INFO] copy ${file}`);
}
}
else {
yield exec.exec('rsync', [
'-rptgoDv',
'--copy-links',
'--copy-dirlinks',
"--exclude='.git'",
"--exclude='.github'",
`${publishDir}/`,
`${workDir}/`
]);
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (files_1_1 && !files_1_1.done && (_a = files_1.return)) yield _a.call(files_1);
}
finally { if (e_1) throw e_1.error; }
}
return;
});

2
package-lock.json generated
View File

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

View File

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

View File

@@ -17,29 +17,18 @@ export async function copyAssets(
publishDir: string,
workDir: string
): Promise<void> {
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 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;
}
} else {
await exec.exec('rsync', [
'-rptgoDv',
'--copy-links',
'--copy-dirlinks',
"--exclude='.git'",
"--exclude='.github'",
`${publishDir}/`,
`${workDir}/`
]);
const filePath = path.join(publishDir, file);
await io.cp(filePath, `${workDir}/`, copyOpts);
core.info(`[INFO] copy ${file}`);
}
return;
}