Compare commits

..

130 Commits

Author SHA1 Message Date
peaceiris
221953c929 chore(release): 3.5.1
Some checks failed
Release / release (push) Has been cancelled
2020-03-09 21:46:00 +09:00
peaceiris
dd094624d6 chore(release): Add build assets 2020-03-09 21:45:59 +09:00
peaceiris
a7bc3c37fd chore: Add missing descriptions 2020-03-09 21:45:20 +09:00
Shohei Ueda
c279167199 ci: update script link [skip ci] 2020-03-09 20:23:58 +09:00
dependabot-preview[bot]
a4c25ca778 deps: bump @types/jest from 25.1.3 to 25.1.4 (#148) 2020-03-08 19:36:32 +00:00
Shohei Ueda
9571d29e0d docs: fix user_name 2020-03-08 15:36:36 +09:00
Shohei Ueda
f3b165fbe1 ci: fix user_name 2020-03-08 15:33:52 +09:00
Shohei Ueda
eb73e9cb9d docs: fix user_name 2020-03-08 15:33:14 +09:00
Shohei Ueda
860ed1944f docs: fix user_name 2020-03-08 15:31:05 +09:00
Shohei Ueda
945c44d50a ci: fix user_name 2020-03-08 15:27:46 +09:00
imgbot[bot]
d8ed36f54a chore: [ImgBot] Optimize images (#147)
/images/committer_github_actions_bot.jpg -- 15.70kb -> 13.58kb (13.46%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-03-08 14:59:49 +09:00
peaceiris
d2d8e21d7e docs: Add bot committer image 2020-03-08 14:54:57 +09:00
Shohei Ueda
80c8fe5fb3 ci: Add GitHub Actions bot as committer 2020-03-08 14:42:09 +09:00
Shohei Ueda
81884efe7c docs: Add GitHub Actions bot committer 2020-03-08 14:39:04 +09:00
Shohei Ueda
618792b2f0 deps: bump hub 2.14.1 to 2.14.2 2020-03-07 19:32:13 +09:00
Shohei Ueda
86214f3d79 chore: Add user support issue template (#146)
* chore: Add user support issue template
* chore: Fix title
* chore: Add link to Actions Documentation

Close #58
2020-03-07 19:01:05 +09:00
Shohei Ueda
68520436f8 docs: Add notes about GitHub_TOKEN (#145)
* docs: Add notes about GitHub_TOKEN
* docs: Update images
2020-03-07 18:32:36 +09:00
peaceiris
fab0628782 chore(release): Remove build assets [skip ci] 2020-03-07 05:46:57 +09:00
peaceiris
73ceb68759 chore(release): 3.5.0
Some checks failed
Release / release (push) Has been cancelled
2020-03-07 05:46:57 +09:00
peaceiris
162bc9ee63 chore(release): Add build assets 2020-03-07 05:46:56 +09:00
Christoph Zwerschke
b76751b9ee docs: improve description of enable_jekyll=disable_nojekyll (see #130) (#132)
This assumes `enable_jekyll` is implemented as (the preferred) alias for `disable_nojekyll`

Close #130
2020-03-07 05:45:47 +09:00
Shohei Ueda
dc1169c5ba feat: Add enable_jekyll (#143)
Implementation of `enable_jekyll` option which is an alias for `disable_nojekyll`

- Issue #130 
- Pull Request #132
2020-03-07 05:30:51 +09:00
Shohei Ueda
ade8887479 deps: bump node 12.15.0 to 12.16.1 (#142)
* deps: bump node 12.15.0 to 12.16.1
* deps: bump git 2.25.0 to 2.25.1
* chore: validate node and npm version by engines field
* ci: Add npm i -g npm
2020-03-07 02:54:14 +09:00
peaceiris
2a9e88ed57 chore(release): Remove build assets [skip ci] 2020-03-07 00:50:04 +09:00
peaceiris
a65bea57e7 chore(release): 3.4.1
Some checks failed
Release / release (push) Has been cancelled
2020-03-07 00:50:03 +09:00
peaceiris
9fd8cd10e7 chore(release): Add build assets 2020-03-07 00:50:02 +09:00
Shohei Ueda
fd6e5fc7ce test: Add testing for set-tokens.ts (#126)
* test: remove main
* test: add getPublishRepo()
* test: Add setPersonalToken()
* test: Add setGithubToken()
* test: add showInputs()
* test: .nojekyll already exists
* test: ignore jest/expect-expect
* refactor: squash inputs log
* fix: throw error message
2020-03-07 00:41:30 +09:00
dependabot-preview[bot]
acd0462710 deps: bump eslint-plugin-jest from 23.8.1 to 23.8.2 (#141) 2020-03-06 09:57:10 +00:00
dependabot-preview[bot]
9faed51ce9 deps: bump @typescript-eslint/eslint-plugin from 2.21.0 to 2.22.0 (#139) 2020-03-03 04:23:53 +00:00
dependabot-preview[bot]
7c45cb42ca deps: bump @typescript-eslint/parser from 2.21.0 to 2.22.0 (#138) 2020-03-03 04:16:02 +00:00
dependabot-preview[bot]
ac39f89062 deps: bump @actions/core from 1.2.2 to 1.2.3 (#140) 2020-03-03 04:08:48 +00:00
dependabot-preview[bot]
dd0b5dfc69 deps: bump @types/node from 12.12.28 to 12.12.29 (#136) 2020-03-02 12:11:32 +00:00
dependabot-preview[bot]
140391da91 deps: bump typescript from 3.8.2 to 3.8.3 (#135)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.2...v3.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 12:10:37 +09:00
dependabot-preview[bot]
50988c17ae deps: bump eslint-plugin-jest from 23.8.0 to 23.8.1 (#134) 2020-03-02 02:57:40 +00:00
Nikos Katirtzis
a4da635d8c docs: Add Docusaurus example (#131) 2020-02-29 01:21:36 +09:00
dependabot-preview[bot]
56fe697825 deps: bump lint-staged from 10.0.7 to 10.0.8 (#129) 2020-02-26 06:24:18 +00:00
dependabot-preview[bot]
bc18026d43 deps: bump @typescript-eslint/parser from 2.20.0 to 2.21.0 (#127) 2020-02-25 03:17:48 +00:00
dependabot-preview[bot]
ce61f4bf52 deps: bump @typescript-eslint/eslint-plugin from 2.20.0 to 2.21.0 (#128) 2020-02-25 03:07:20 +00:00
Shohei Ueda
b81e21a3dc ci: Add deployment status check workflow (#125) 2020-02-24 20:35:46 +09:00
peaceiris
79cc24d126 chore(release): Remove build assets [skip ci] 2020-02-24 19:56:53 +09:00
peaceiris
364c31d33b chore(release): 3.4.0
Some checks failed
Release / release (push) Has been cancelled
2020-02-24 19:56:52 +09:00
peaceiris
3c65337a25 chore(release): Add build assets 2020-02-24 19:56:51 +09:00
peaceiris
7b12ca9aeb docs: update 2020-02-24 19:48:18 +09:00
Shohei Ueda
62e7849d7a docs: Put github_token as first example (#115)
* docs: Put github_token as first example
* docs: move Create SSH Deploy Key
* docs: remove github_token section
* docs: remove badge
* docs: remove How to add CNAME
* docs: remove Deployment completed but you cannot read
2020-02-24 19:35:55 +09:00
dependabot-preview[bot]
e0af1f7de0 deps: bump eslint-plugin-jest from 23.7.0 to 23.8.0 (#124)
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.7.0 to 23.8.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.7.0...v23.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-24 19:04:41 +09:00
peaceiris
67f77416c9 chore(release): Remove build assets [skip ci] 2020-02-24 18:50:44 +09:00
peaceiris
d0ac7fa637 chore(release): 3.3.0
Some checks failed
Release / release (push) Has been cancelled
2020-02-24 18:50:44 +09:00
peaceiris
da23196fc5 chore(release): Add build assets 2020-02-24 18:50:43 +09:00
Shohei Ueda
00fde1eb97 feat: Add disable_nojekyll and cname options (#119)
* feat: Add disable_nojekyll and cname options
* docs: Add cname and disable_nojekyll
* chore: Add vim
* chore(release): 3.3.0-0
* ci: Add codecov/codecov-action
* refactor: Enhance warning message

- Add .nojekyll file by default to only the master and gh-pages branches. When the file already exists, this action does nothing.
- When we set other branches to publish_branch, this action does not add .nojekyll file.

cf. https://github.com/peaceiris/actions-gh-pages/issues/112#issuecomment-589678269

Close #112

Co-authored-by: Daniel Himmelstein <daniel.himmelstein@gmail.com>
Co-authored-by: Nicolas Vanhoren <nicolas.vanhoren@gmail.com>
2020-02-24 18:49:55 +09:00
dependabot-preview[bot]
6244b197b6 deps: bump @zeit/ncc from 0.21.0 to 0.21.1 (#101) 2020-02-21 03:08:01 +00:00
dependabot-preview[bot]
e58a6c156e deps: bump typescript from 3.7.5 to 3.8.2 (#121) 2020-02-21 02:41:46 +00:00
dependabot-preview[bot]
b243cafb6e deps: bump @types/node from 12.12.27 to 12.12.28 (#122) 2020-02-21 02:34:38 +00:00
dependabot-preview[bot]
5d3cd509d9 deps: bump @actions/github from 2.1.0 to 2.1.1 (#120) 2020-02-21 02:27:59 +00:00
dependabot-preview[bot]
0b1dd44709 deps: bump @types/jest from 25.1.2 to 25.1.3 (#118) 2020-02-20 02:26:45 +00:00
dependabot-preview[bot]
e1bf32ad68 deps: bump ts-jest from 25.2.0 to 25.2.1 (#117) 2020-02-20 02:25:06 +00:00
peaceiris
61b479a8a4 chore(release): Remove build assets [skip ci] 2020-02-19 23:36:07 +09:00
peaceiris
8a36604631 chore(release): 3.2.0
Some checks failed
Release / release (push) Has been cancelled
2020-02-19 23:36:06 +09:00
peaceiris
a8fa52a354 chore(release): Add build assets 2020-02-19 23:36:05 +09:00
Shohei Ueda
74f652acfd feat: Remove warning about GITHUB_TOKEN (#108)
GitHub might have started to supporting to trigger the GitHub Pages build event by GITHUB_TOKEN on public repositories. (We can already use the token on private repositories.) Be careful, there is no official announcement about this by GitHub.

cf. #9
2020-02-19 23:22:07 +09:00
peaceiris
7b9b3b3f5f chore(release): Remove build assets [skip ci] 2020-02-19 22:58:13 +09:00
peaceiris
43687c847a chore(release): 3.1.0
Some checks failed
Release / release (push) Has been cancelled
2020-02-19 22:58:13 +09:00
peaceiris
218e357d06 chore(release): Add build assets 2020-02-19 22:58:12 +09:00
Shohei Ueda
2f5ccc92df fix: Use onetime workdir name (#109)
* chore: Allow to release from not master

* chore(release): 3.0.4-0
* chore(release): 3.0.4-1
2020-02-19 22:56:40 +09:00
Shohei Ueda
195ab8005d deps: Rollback @types/node 13 to 12 (#111) 2020-02-19 12:16:41 +09:00
dependabot-preview[bot]
591c4bdf2e deps: bump @types/node from 13.7.1 to 13.7.2 (#110) 2020-02-19 02:38:01 +00:00
dependabot-preview[bot]
1c50baa294 deps: bump @typescript-eslint/eslint-plugin from 2.19.2 to 2.20.0 (#105)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.20.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 15:40:15 +09:00
dependabot-preview[bot]
73c09c703e deps: bump @typescript-eslint/parser from 2.19.2 to 2.20.0 (#106) 2020-02-18 06:21:35 +00:00
wu-yu-xuan
55a68e34ca refactor: fix typo and remove useless function (#107) 2020-02-18 14:30:50 +09:00
Shohei Ueda
60c31d23a8 docs: fix 2020-02-15 13:37:16 +09:00
Shohei Ueda
1887981f72 docs: update status of github_token 2020-02-15 13:36:36 +09:00
dependabot-preview[bot]
49a6939dbb deps: bump husky from 4.2.1 to 4.2.3 (#102) 2020-02-13 04:47:49 +00:00
dependabot-preview[bot]
0b00dd2a9f deps: bump @types/node from 13.7.0 to 13.7.1 (#99) 2020-02-12 05:16:14 +00:00
dependabot-preview[bot]
5d5e9338cc deps: bump @typescript-eslint/eslint-plugin from 2.19.0 to 2.19.2 (#97) 2020-02-11 08:24:41 +00:00
dependabot-preview[bot]
8b52b41ecb deps: bump @typescript-eslint/parser from 2.19.0 to 2.19.2 (#96) 2020-02-11 08:18:57 +00:00
dependabot-preview[bot]
0a1a58196b deps: bump eslint-plugin-jest from 23.6.0 to 23.7.0 (#95) 2020-02-10 07:30:56 +00:00
peaceiris
476fa94197 fix: Change final message 2020-02-08 17:31:09 +09:00
Shohei Ueda
0e542f9f92 deps: bump node from 12.14.1 to 12.15.0 (#94) 2020-02-08 10:28:28 +09:00
dependabot-preview[bot]
aec195ebb4 deps: bump @types/jest from 25.1.1 to 25.1.2 (#93) 2020-02-07 02:49:09 +00:00
peaceiris
41015898aa docs: rename author to Maintainer 2020-02-06 23:28:54 +09:00
Shohei Ueda
a7866b5bd3 docs: update publish_branch for v3 2020-02-06 19:30:48 +09:00
Shohei Ueda
752214aa33 docs: update job name 2020-02-06 15:49:52 +09:00
peaceiris
0b24a9f462 chore(release): Remove build assets [skip ci] 2020-02-06 15:40:05 +09:00
peaceiris
354d78ff6f chore(release): 3.0.3
Some checks failed
Release / release (push) Has been cancelled
2020-02-06 15:40:04 +09:00
peaceiris
7605281c4b chore(release): Add build assets 2020-02-06 15:40:03 +09:00
peaceiris
2948e5eda8 docs: update example of publish_branch 2020-02-06 15:39:37 +09:00
peaceiris
e8d0817a48 chore(release): Remove build assets [skip ci] 2020-02-06 15:22:10 +09:00
peaceiris
9d8382b381 chore(release): 3.0.3-0
Some checks failed
Release / release (push) Has been cancelled
2020-02-06 15:22:10 +09:00
peaceiris
8ccc2d9608 chore(release): Add build assets 2020-02-06 15:22:08 +09:00
Shohei Ueda
1b6740cb30 fix: Enable to create branch for first deployment (#92)
* fix: Enable to create branch for first deployment
* fix: remove pull_request

* ci: remove lint-staged husky for testing
* ci: Add git checkout {package-lock,package}.json
2020-02-06 15:21:18 +09:00
peaceiris
479c59e6d2 chore(release): Remove build assets [skip ci] 2020-02-06 01:55:56 +09:00
peaceiris
a22f6fc3b7 chore(release): 3.0.2
Some checks failed
Release / release (push) Has been cancelled
2020-02-06 01:55:55 +09:00
peaceiris
f28cc017a9 chore(release): Add build assets 2020-02-06 01:55:54 +09:00
peaceiris
f8b5a36401 fix: add filePath 2020-02-06 01:52:45 +09:00
peaceiris
848165cf9f fix: copy force 2020-02-06 01:50:30 +09:00
peaceiris
fb54d6af4d fix: add debug 2020-02-06 01:41:17 +09:00
peaceiris
6edc4c9764 fix: copy directories #89 2020-02-06 01:38:12 +09:00
peaceiris
d35854bdf8 docs: update log example for v3 2020-02-05 20:38:55 +09:00
peaceiris
f0177d176f docs: Add Supported Platforms table 2020-02-05 20:32:49 +09:00
peaceiris
0ba5bf3eeb docs: Add CodeFactor badge 2020-02-05 20:26:02 +09:00
peaceiris
cfdf8c43ed ci: use github_token for windows-latest 2020-02-05 20:11:40 +09:00
peaceiris
ce8c273a61 chore(release): Remove build assets [skip ci] 2020-02-05 20:06:02 +09:00
peaceiris
5378bd89b8 chore(release): 3.0.1
Some checks failed
Release / release (push) Has been cancelled
2020-02-05 20:06:01 +09:00
peaceiris
db62f9acd4 chore(release): Add build assets 2020-02-05 20:06:00 +09:00
Shohei Ueda
ed21b6a594 feat: Add getHomeDir() for windows (#86) 2020-02-05 20:04:31 +09:00
peaceiris
9f11da81ae refactor: change to core.debug 2020-02-05 18:50:44 +09:00
Shohei Ueda
a1375a4637 docs: remove v2 example 2020-02-05 18:38:36 +09:00
Shohei Ueda
1a26eaca33 docs: update 2020-02-05 18:37:47 +09:00
peaceiris
1a13108865 docs: update for v3 2020-02-05 17:12:51 +09:00
peaceiris
d0de38a352 docs: update for v3 2020-02-05 17:12:06 +09:00
peaceiris
b3cfcb13c0 docs: update for v3 2020-02-05 17:11:16 +09:00
peaceiris
b1aaa85b67 docs: update for v3 2020-02-05 17:10:00 +09:00
peaceiris
f1e7cd608c docs: update for v3 2020-02-05 17:09:37 +09:00
peaceiris
07a3f2915e docs: update for v3 2020-02-05 17:09:00 +09:00
peaceiris
02c38586a5 docs: update for v3 2020-02-05 17:08:19 +09:00
peaceiris
59bbb98387 docs: update for v3 2020-02-05 17:06:55 +09:00
peaceiris
9b3fcdf515 docs: remove Script mode section 2020-02-05 17:06:05 +09:00
peaceiris
be27dcce48 docs: update for v3 2020-02-05 17:05:37 +09:00
peaceiris
ccf71d1162 docs: update for v3 2020-02-05 17:04:27 +09:00
peaceiris
5fe4aa3f24 docs: update for v3 2020-02-05 17:03:44 +09:00
peaceiris
428902c6cd docs: update for v3 2020-02-05 17:02:53 +09:00
peaceiris
00bca7b88c docs: update for v3 2020-02-05 17:00:50 +09:00
peaceiris
c940278a4c docs: update overview 2020-02-05 15:44:30 +09:00
peaceiris
9cec798451 docs: update GitHub Actions badge 2020-02-05 15:39:32 +09:00
peaceiris
ec95e8e7aa docs: Add link to v2 2020-02-05 14:44:12 +09:00
peaceiris
5570fc7c70 chore(release): Remove build assets [skip ci] 2020-02-05 14:41:09 +09:00
peaceiris
4a69c2d60c chore(release): 3.0.0
Some checks failed
Release / release (push) Has been cancelled
2020-02-05 14:41:09 +09:00
peaceiris
f990e1a2a0 chore(release): Add build assets 2020-02-05 14:41:08 +09:00
peaceiris
0629babb09 fix: action title 2020-02-05 14:40:07 +09:00
peaceiris
a150e4e690 ci: force_orphan to false 2020-02-05 14:37:47 +09:00
peaceiris
ec09a8863c chore(release): Remove build assets [skip ci] 2020-02-05 14:36:37 +09:00
37 changed files with 2033 additions and 3428 deletions

View File

@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
title: 'Bug: This is a sample issue title'
title: 'sample_title'
labels: bug
assignees: peaceiris

View File

@@ -3,6 +3,9 @@ contact_links:
- name: GitHub Actions Community Forum
url: https://github.community/t5/GitHub-Actions/bd-p/actions
about: Please ask questions about GitHub Actions here.
- name: GitHub Pages help
- name: GitHub Pages Documentation
url: https://help.github.com/en/github/working-with-github-pages
about: GitHub Pages documentaion here.
about: GitHub Pages official documentaion here.
- name: GitHub Actions Documentation
url: https://help.github.com/en/actions
about: GitHub Actions official documentaion here.

View File

@@ -1,7 +1,7 @@
---
name: Proposal
about: Suggest an idea for this project
title: 'proposal: This is a sample title'
title: 'sample_title'
labels: proposal
assignees: peaceiris

31
.github/ISSUE_TEMPLATE/user_support.md vendored Normal file
View File

@@ -0,0 +1,31 @@
---
name: User support
about: Questions for this action
title: 'sample_title'
labels: support
assignees: peaceiris
---
**Check list before opening this issue**
- [ ] I read the latest README
- I checked [Available Options](https://github.com/peaceiris/actions-gh-pages#options)
- I followed [Tips and FAQ](https://github.com/peaceiris/actions-gh-pages#tips-and-faq)
- I tried [Workflow Examples](https://github.com/peaceiris/actions-gh-pages#examples)
**Describe your question**
A clear and concise description of what the question is.
**Link to your contents**
- Link to your public repository here
- Link to your workflow here
**Screenshots**
If applicable, add screenshots to help explain your question.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,14 @@
name: Check Pages Status
on: page_build
jobs:
pages-status-check:
runs-on: ubuntu-18.04
steps:
- name: check status
run: |
status = '${{ github.event.build.status }}'
errormsg = '${{ github.event.build.error.message }}'
assert status == 'built', 'Status: {status}\nError: {errormsg}'.format(status, errormsg)
shell: python

View File

@@ -3,13 +3,12 @@ name: Release
on:
push:
tags:
- 'v3.*.*'
- 'v3.*.*'
jobs:
release:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dump GitHub context
@@ -19,8 +18,8 @@ jobs:
- name: Install github/hub
run: |
export HUB_VERSION="2.14.1"
curl -fsSL https://github.com/github/hub/raw/40e421edd2c63d57bb8daa4bb9bbdfa21e8becf9/script/get | bash -s "${HUB_VERSION}"
export HUB_VERSION="2.14.2"
curl -fsSL https://github.com/github/hub/raw/8d91904208171b013f9a9d1175f4ab39068db047/script/get | bash -s "${HUB_VERSION}"
- name: Create release
env:

View File

@@ -23,13 +23,13 @@ jobs:
runs-on: ${{ matrix.os }}
if: contains(github.event.head_commit.message, '[skip ci]') == false
strategy:
max-parallel: 1
matrix:
os:
- 'ubuntu-18.04'
# - 'macos-latest'
# - 'windows-latest'
- 'macos-latest'
- 'windows-latest'
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
@@ -41,7 +41,21 @@ jobs:
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- run: npm i -g npm
- name: Dump version
run: |
node -v
npm --version
git --version
- run: npm ci
- name: Remove lint-staged husky
run: |
npm uninstall lint-staged husky
git checkout package-lock.json package.json
- run: npm run build
- name: Setup mdBook
@@ -62,25 +76,38 @@ jobs:
echo "::set-output name=deploy_tag_name::deploy-${TAG_NAME}"
- name: Deploy
if: matrix.os != 'windows-latest'
uses: ./
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_branch: master
# publish_branch: gh-pages
publish_dir: ./test_projects/mdbook/book
# external_repository: ''
allow_empty_commit: true
# keep_files: true
force_orphan: true
# force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
# commit_message: ${{ github.event.head_commit.message }}
# tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
# tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
- name: Deploy
if: matrix.os == 'windows-latest'
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# personal_token: ${{ secrets.PERSONAL_TOKEN }}
# publish_branch: gh-pages
publish_dir: ./test_projects/mdbook/book
# external_repository: ''
allow_empty_commit: true
# keep_files: true
# force_orphan: true
# user_name: iris
# user_email: email@peaceiris.com
# commit_message: ${{ github.event.head_commit.message }}
# tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
# tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
# - name: Deploy v2
# uses: peaceiris/actions-gh-pages@v2
# env:
# ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# PUBLISH_BRANCH: gh-pages
# PUBLISH_DIR: ./test_projects/mdbook/book

View File

@@ -29,7 +29,6 @@ jobs:
- 'macos-latest'
- 'windows-latest'
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
@@ -41,6 +40,14 @@ jobs:
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- run: npm i -g npm
- name: Dump version
run: |
node -v
npm --version
git --version
- run: npm ci
- name: Run prettier
@@ -62,3 +69,7 @@ jobs:
with:
name: coverage
path: coverage
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

2
.nvmrc
View File

@@ -1 +1 @@
12.14.1
12.16.1

View File

@@ -2,6 +2,341 @@
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.5.1](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.0...v3.5.1) (2020-03-09)
### chore
* [ImgBot] Optimize images (#147) ([d8ed36f](https://github.com/peaceiris/actions-gh-pages/commit/d8ed36f54aee9f59e2e00fa7aceda885cd6d3eb8)), closes [#147](https://github.com/peaceiris/actions-gh-pages/issues/147)
* Add missing descriptions ([a7bc3c3](https://github.com/peaceiris/actions-gh-pages/commit/a7bc3c37fdc9c640720165cb06fbffe20febe7a3))
* Add user support issue template (#146) ([86214f3](https://github.com/peaceiris/actions-gh-pages/commit/86214f3d7909e3e81e38f0a73a897e00fc1198e4)), closes [#146](https://github.com/peaceiris/actions-gh-pages/issues/146) [#58](https://github.com/peaceiris/actions-gh-pages/issues/58)
### ci
* Add GitHub Actions bot as committer ([80c8fe5](https://github.com/peaceiris/actions-gh-pages/commit/80c8fe5fb32cd1e1b866e2d0d0d34cb1ba492586))
* fix user_name ([f3b165f](https://github.com/peaceiris/actions-gh-pages/commit/f3b165fbe1a9ec4c9bd8b435ee13fc7cb10ef42a))
* fix user_name ([945c44d](https://github.com/peaceiris/actions-gh-pages/commit/945c44d50a26eb6b24dbc0157dd836a39f9d5edb))
* update script link [skip ci] ([c279167](https://github.com/peaceiris/actions-gh-pages/commit/c2791671998aa8f7858322a1bb74a1e74fb58923))
### deps
* bump @types/jest from 25.1.3 to 25.1.4 (#148) ([a4c25ca](https://github.com/peaceiris/actions-gh-pages/commit/a4c25ca7788f09428015b84ffd661ec30c7f2734)), closes [#148](https://github.com/peaceiris/actions-gh-pages/issues/148)
* bump hub 2.14.1 to 2.14.2 ([618792b](https://github.com/peaceiris/actions-gh-pages/commit/618792b2f09d6b33bc394ffa2ffaec5ce48fc15d))
### docs
* Add bot committer image ([d2d8e21](https://github.com/peaceiris/actions-gh-pages/commit/d2d8e21d7ee28e4ab68e977f54ce0de33f9ae3ba))
* Add GitHub Actions bot committer ([81884ef](https://github.com/peaceiris/actions-gh-pages/commit/81884efe7cbee81f6d73a96037ac547b3eda1b78))
* Add notes about GitHub_TOKEN (#145) ([6852043](https://github.com/peaceiris/actions-gh-pages/commit/68520436f89fb253238c54f1ad6c5c3681c3e85b)), closes [#145](https://github.com/peaceiris/actions-gh-pages/issues/145)
* fix user_name ([9571d29](https://github.com/peaceiris/actions-gh-pages/commit/9571d29e0df7e4a5bd5700f5531848e9158d7a2c))
* fix user_name ([eb73e9c](https://github.com/peaceiris/actions-gh-pages/commit/eb73e9cb9d8ed1656b67a83c37e7dc1bc9c0dc00))
* fix user_name ([860ed19](https://github.com/peaceiris/actions-gh-pages/commit/860ed1944f8968c2df2e052bd419a015ec10be38))
# [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)
### 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)
### feat
* Add enable_jekyll ([1fff2ca](https://github.com/peaceiris/actions-gh-pages/commit/1fff2ca84a6b42067a86c6229774aa5e2891a661))
## [3.4.1](https://github.com/peaceiris/actions-gh-pages/compare/v3.4.0...v3.4.1) (2020-03-06)
### ci
* Add deployment status check workflow (#125) ([b81e21a](https://github.com/peaceiris/actions-gh-pages/commit/b81e21a3dc037a4037bef6bd44bc1bee36d3626f)), closes [#125](https://github.com/peaceiris/actions-gh-pages/issues/125)
### deps
* bump @actions/core from 1.2.2 to 1.2.3 (#140) ([ac39f89](https://github.com/peaceiris/actions-gh-pages/commit/ac39f890622b7f6950b6eb9cc43666c033277fb1)), closes [#140](https://github.com/peaceiris/actions-gh-pages/issues/140)
* bump @types/node from 12.12.28 to 12.12.29 (#136) ([dd0b5df](https://github.com/peaceiris/actions-gh-pages/commit/dd0b5dfc6981e11137b2a1fad785d5342c0b5bc0)), closes [#136](https://github.com/peaceiris/actions-gh-pages/issues/136)
* bump @typescript-eslint/eslint-plugin from 2.20.0 to 2.21.0 (#128) ([ce61f4b](https://github.com/peaceiris/actions-gh-pages/commit/ce61f4bf52b32c725cd5837e7b56d7a587a32af6)), closes [#128](https://github.com/peaceiris/actions-gh-pages/issues/128)
* bump @typescript-eslint/eslint-plugin from 2.21.0 to 2.22.0 (#139) ([9faed51](https://github.com/peaceiris/actions-gh-pages/commit/9faed51ce97835a66741dc3d9368dc3402c12174)), closes [#139](https://github.com/peaceiris/actions-gh-pages/issues/139)
* bump @typescript-eslint/parser from 2.20.0 to 2.21.0 (#127) ([bc18026](https://github.com/peaceiris/actions-gh-pages/commit/bc18026d43cd46451191723b7502ac0057177f5c)), closes [#127](https://github.com/peaceiris/actions-gh-pages/issues/127)
* bump @typescript-eslint/parser from 2.21.0 to 2.22.0 (#138) ([7c45cb4](https://github.com/peaceiris/actions-gh-pages/commit/7c45cb42cade3f3bc0dab3c894044809b8ed4b4a)), closes [#138](https://github.com/peaceiris/actions-gh-pages/issues/138)
* bump eslint-plugin-jest from 23.8.0 to 23.8.1 (#134) ([50988c1](https://github.com/peaceiris/actions-gh-pages/commit/50988c17ae540cf540cac254aeae22e8f1cbad46)), closes [#134](https://github.com/peaceiris/actions-gh-pages/issues/134)
* bump eslint-plugin-jest from 23.8.1 to 23.8.2 (#141) ([acd0462](https://github.com/peaceiris/actions-gh-pages/commit/acd04627103a2d4d7620edca1bb74897a8180a84)), closes [#141](https://github.com/peaceiris/actions-gh-pages/issues/141)
* bump lint-staged from 10.0.7 to 10.0.8 (#129) ([56fe697](https://github.com/peaceiris/actions-gh-pages/commit/56fe6978255c0fb44f70c59879daca5984de7ac4)), closes [#129](https://github.com/peaceiris/actions-gh-pages/issues/129)
* bump typescript from 3.8.2 to 3.8.3 (#135) ([140391d](https://github.com/peaceiris/actions-gh-pages/commit/140391da91a8b458871e276b87abbfe7c0557c8c)), closes [#135](https://github.com/peaceiris/actions-gh-pages/issues/135)
### docs
* Add Docusaurus example (#131) ([a4da635](https://github.com/peaceiris/actions-gh-pages/commit/a4da635d8c553a327144267b3826e838aefb1561)), closes [#131](https://github.com/peaceiris/actions-gh-pages/issues/131)
### test
* Add testing for set-tokens.ts (#126) ([fd6e5fc](https://github.com/peaceiris/actions-gh-pages/commit/fd6e5fc7ce07cfd94a2311f7ac112bd797c3aee7)), closes [#126](https://github.com/peaceiris/actions-gh-pages/issues/126)
# [3.4.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.3.0...v3.4.0) (2020-02-24)
### deps
* bump eslint-plugin-jest from 23.7.0 to 23.8.0 (#124) ([e0af1f7](https://github.com/peaceiris/actions-gh-pages/commit/e0af1f7de04642a5e810c38b24abd507d81b86be)), closes [#124](https://github.com/peaceiris/actions-gh-pages/issues/124)
### docs
* Put github_token as first example (#115) ([62e7849](https://github.com/peaceiris/actions-gh-pages/commit/62e7849d7ab5a2167baf529dc8fd9034fcf41c43)), closes [#115](https://github.com/peaceiris/actions-gh-pages/issues/115)
* update ([7b12ca9](https://github.com/peaceiris/actions-gh-pages/commit/7b12ca9aebe1ddcf25dc1c6fd793308e703b4ec7))
# [3.3.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.2.0...v3.3.0) (2020-02-24)
### deps
* bump @actions/github from 2.1.0 to 2.1.1 (#120) ([5d3cd50](https://github.com/peaceiris/actions-gh-pages/commit/5d3cd509d9e8ab8ba8b6c6981eb8ecb077ab2109)), closes [#120](https://github.com/peaceiris/actions-gh-pages/issues/120)
* bump @types/jest from 25.1.2 to 25.1.3 (#118) ([0b1dd44](https://github.com/peaceiris/actions-gh-pages/commit/0b1dd44709acc2ba27cf43e181767b92e78d1577)), closes [#118](https://github.com/peaceiris/actions-gh-pages/issues/118)
* bump @types/node from 12.12.27 to 12.12.28 (#122) ([b243caf](https://github.com/peaceiris/actions-gh-pages/commit/b243cafb6e6598d71925399552d569a628a42aa7)), closes [#122](https://github.com/peaceiris/actions-gh-pages/issues/122)
* bump @zeit/ncc from 0.21.0 to 0.21.1 (#101) ([6244b19](https://github.com/peaceiris/actions-gh-pages/commit/6244b197b6c5a57172d87769cd03d79cedae9dca)), closes [#101](https://github.com/peaceiris/actions-gh-pages/issues/101)
* bump ts-jest from 25.2.0 to 25.2.1 (#117) ([e1bf32a](https://github.com/peaceiris/actions-gh-pages/commit/e1bf32ad68fadb9a32147579d6dc49b51d6ddefb)), closes [#117](https://github.com/peaceiris/actions-gh-pages/issues/117)
* bump typescript from 3.7.5 to 3.8.2 (#121) ([e58a6c1](https://github.com/peaceiris/actions-gh-pages/commit/e58a6c156e7249d4e6052539e2ed0aa449bdd4f4)), closes [#121](https://github.com/peaceiris/actions-gh-pages/issues/121)
### feat
* Add disable_nojekyll and cname options (#119) ([00fde1e](https://github.com/peaceiris/actions-gh-pages/commit/00fde1eb97e54d4fa89f31806ff2815878fafcb6)), closes [#119](https://github.com/peaceiris/actions-gh-pages/issues/119) [/github.com/peaceiris/actions-gh-pages/issues/112#issuecomment-589678269](https://github.com//github.com/peaceiris/actions-gh-pages/issues/112/issues/issuecomment-589678269) [#112](https://github.com/peaceiris/actions-gh-pages/issues/112)
# [3.3.0-0](https://github.com/peaceiris/actions-gh-pages/compare/v3.2.0...v3.3.0-0) (2020-02-20)
### chore
* Add vim ([b9a6975](https://github.com/peaceiris/actions-gh-pages/commit/b9a697582713e95c1d628172933226631d3825af))
### deps
* bump @types/jest from 25.1.2 to 25.1.3 (#118) ([0b1dd44](https://github.com/peaceiris/actions-gh-pages/commit/0b1dd44709acc2ba27cf43e181767b92e78d1577)), closes [#118](https://github.com/peaceiris/actions-gh-pages/issues/118)
* bump ts-jest from 25.2.0 to 25.2.1 (#117) ([e1bf32a](https://github.com/peaceiris/actions-gh-pages/commit/e1bf32ad68fadb9a32147579d6dc49b51d6ddefb)), closes [#117](https://github.com/peaceiris/actions-gh-pages/issues/117)
### feat
* Add disable_nojekyll and cname options ([7c4b591](https://github.com/peaceiris/actions-gh-pages/commit/7c4b591cf65cf4daf0464fba89b32ff4e764b427)), closes [#112](https://github.com/peaceiris/actions-gh-pages/issues/112)
# [3.2.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.0...v3.2.0) (2020-02-19)
### feat
* Remove warning about GITHUB_TOKEN (#108) ([74f652a](https://github.com/peaceiris/actions-gh-pages/commit/74f652acfdfc3290f8b6f7c5e65fd1f563412cf5)), closes [#108](https://github.com/peaceiris/actions-gh-pages/issues/108) [#9](https://github.com/peaceiris/actions-gh-pages/issues/9)
# [3.1.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.3...v3.1.0) (2020-02-19)
### deps
* bump @types/jest from 25.1.1 to 25.1.2 (#93) ([aec195e](https://github.com/peaceiris/actions-gh-pages/commit/aec195ebb4e984f62f48139a5e24aa85ea31e891)), closes [#93](https://github.com/peaceiris/actions-gh-pages/issues/93)
* bump @types/node from 13.7.0 to 13.7.1 (#99) ([0b00dd2](https://github.com/peaceiris/actions-gh-pages/commit/0b00dd2a9f91c1854f4b1cfe68dc30891ebccc9f)), closes [#99](https://github.com/peaceiris/actions-gh-pages/issues/99)
* bump @types/node from 13.7.1 to 13.7.2 (#110) ([591c4bd](https://github.com/peaceiris/actions-gh-pages/commit/591c4bdf2ee1c6aa5f1958c4553902feac06dcfe)), closes [#110](https://github.com/peaceiris/actions-gh-pages/issues/110)
* bump @typescript-eslint/eslint-plugin from 2.19.0 to 2.19.2 (#97) ([5d5e933](https://github.com/peaceiris/actions-gh-pages/commit/5d5e9338ccbca63f80f5ee66ba9e9eff14bacb68)), closes [#97](https://github.com/peaceiris/actions-gh-pages/issues/97)
* bump @typescript-eslint/eslint-plugin from 2.19.2 to 2.20.0 (#105) ([1c50baa](https://github.com/peaceiris/actions-gh-pages/commit/1c50baa294d259f81459f7a495f8d0d2a50a1b6d)), closes [#105](https://github.com/peaceiris/actions-gh-pages/issues/105)
* bump @typescript-eslint/parser from 2.19.0 to 2.19.2 (#96) ([8b52b41](https://github.com/peaceiris/actions-gh-pages/commit/8b52b41ecb191f50bd5efc9ee2c0266a2d171d14)), closes [#96](https://github.com/peaceiris/actions-gh-pages/issues/96)
* bump @typescript-eslint/parser from 2.19.2 to 2.20.0 (#106) ([73c09c7](https://github.com/peaceiris/actions-gh-pages/commit/73c09c703e63c0b442ffa50624ace10eaa929280)), closes [#106](https://github.com/peaceiris/actions-gh-pages/issues/106)
* bump eslint-plugin-jest from 23.6.0 to 23.7.0 (#95) ([0a1a581](https://github.com/peaceiris/actions-gh-pages/commit/0a1a58196ba5bf48e168475e0ac3898fbd3043e2)), closes [#95](https://github.com/peaceiris/actions-gh-pages/issues/95)
* bump husky from 4.2.1 to 4.2.3 (#102) ([49a6939](https://github.com/peaceiris/actions-gh-pages/commit/49a6939dbb77d7656228cdc3bed6a99d5124a6b2)), closes [#102](https://github.com/peaceiris/actions-gh-pages/issues/102)
* bump node from 12.14.1 to 12.15.0 (#94) ([0e542f9](https://github.com/peaceiris/actions-gh-pages/commit/0e542f9f9231c005e1a6363a33a69fdbde436085)), closes [#94](https://github.com/peaceiris/actions-gh-pages/issues/94)
* Rollback @types/node 13 to 12 (#111) ([195ab80](https://github.com/peaceiris/actions-gh-pages/commit/195ab8005d4af142c40fd8e53a59783b697d75d9)), closes [#111](https://github.com/peaceiris/actions-gh-pages/issues/111)
### docs
* fix ([60c31d2](https://github.com/peaceiris/actions-gh-pages/commit/60c31d23a8a096624a3b9a0955a05ea9941dc140))
* rename author to Maintainer ([4101589](https://github.com/peaceiris/actions-gh-pages/commit/41015898aad0abad9d0760bc576e4748e476d4f9))
* update job name ([752214a](https://github.com/peaceiris/actions-gh-pages/commit/752214aa33756f6e097f908671681a13865a9991))
* update publish_branch for v3 ([a7866b5](https://github.com/peaceiris/actions-gh-pages/commit/a7866b5bd3a121a460c8c39cb1c9d1586db6b231))
* update status of github_token ([1887981](https://github.com/peaceiris/actions-gh-pages/commit/1887981f72e59b54f68febb4fa4786e7e153ef6d))
### fix
* Change final message ([476fa94](https://github.com/peaceiris/actions-gh-pages/commit/476fa94197aea4d3f74e5619ae77ebf966fd5fff))
* Use onetime workdir name (#109) ([2f5ccc9](https://github.com/peaceiris/actions-gh-pages/commit/2f5ccc92dfcf8e85d9d3c19dc842a440380253bf)), closes [#109](https://github.com/peaceiris/actions-gh-pages/issues/109)
### refactor
* fix typo and remove useless function (#107) ([55a68e3](https://github.com/peaceiris/actions-gh-pages/commit/55a68e34ca406d99b5b2a4549d7ade5eeb03d860)), closes [#107](https://github.com/peaceiris/actions-gh-pages/issues/107)
## [3.0.4-1](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.4-0...v3.0.4-1) (2020-02-19)
### deps
* bump @types/node from 13.7.1 to 13.7.2 (#110) ([591c4bd](https://github.com/peaceiris/actions-gh-pages/commit/591c4bdf2ee1c6aa5f1958c4553902feac06dcfe)), closes [#110](https://github.com/peaceiris/actions-gh-pages/issues/110)
* Rollback @types/node 13 to 12 (#111) ([195ab80](https://github.com/peaceiris/actions-gh-pages/commit/195ab8005d4af142c40fd8e53a59783b697d75d9)), closes [#111](https://github.com/peaceiris/actions-gh-pages/issues/111)
### fix
* Add await ([0031179](https://github.com/peaceiris/actions-gh-pages/commit/00311793aa104bf99501373756461475b6752f16))
* convert to string ([cbe4d56](https://github.com/peaceiris/actions-gh-pages/commit/cbe4d56fb8bd50d63919f783483f74c694a3dd9b))
* use onetime workdir name ([0d912a1](https://github.com/peaceiris/actions-gh-pages/commit/0d912a1314ce9d77f29bc0c1fada559223dd5563))
### refactor
* Add info message ([8e6c12a](https://github.com/peaceiris/actions-gh-pages/commit/8e6c12a2b5f973c8736f831398d0fe7c980f1431))
## [3.0.4-0](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.3...v3.0.4-0) (2020-02-18)
### chore
* Allow to release from not master ([3c7cd58](https://github.com/peaceiris/actions-gh-pages/commit/3c7cd587e403a76d6725a0e84796cf12a59752f3))
### deps
* bump @types/jest from 25.1.1 to 25.1.2 (#93) ([aec195e](https://github.com/peaceiris/actions-gh-pages/commit/aec195ebb4e984f62f48139a5e24aa85ea31e891)), closes [#93](https://github.com/peaceiris/actions-gh-pages/issues/93)
* bump @types/node from 13.7.0 to 13.7.1 (#99) ([0b00dd2](https://github.com/peaceiris/actions-gh-pages/commit/0b00dd2a9f91c1854f4b1cfe68dc30891ebccc9f)), closes [#99](https://github.com/peaceiris/actions-gh-pages/issues/99)
* bump @typescript-eslint/eslint-plugin from 2.19.0 to 2.19.2 (#97) ([5d5e933](https://github.com/peaceiris/actions-gh-pages/commit/5d5e9338ccbca63f80f5ee66ba9e9eff14bacb68)), closes [#97](https://github.com/peaceiris/actions-gh-pages/issues/97)
* bump @typescript-eslint/eslint-plugin from 2.19.2 to 2.20.0 (#105) ([1c50baa](https://github.com/peaceiris/actions-gh-pages/commit/1c50baa294d259f81459f7a495f8d0d2a50a1b6d)), closes [#105](https://github.com/peaceiris/actions-gh-pages/issues/105)
* bump @typescript-eslint/parser from 2.19.0 to 2.19.2 (#96) ([8b52b41](https://github.com/peaceiris/actions-gh-pages/commit/8b52b41ecb191f50bd5efc9ee2c0266a2d171d14)), closes [#96](https://github.com/peaceiris/actions-gh-pages/issues/96)
* bump @typescript-eslint/parser from 2.19.2 to 2.20.0 (#106) ([73c09c7](https://github.com/peaceiris/actions-gh-pages/commit/73c09c703e63c0b442ffa50624ace10eaa929280)), closes [#106](https://github.com/peaceiris/actions-gh-pages/issues/106)
* bump eslint-plugin-jest from 23.6.0 to 23.7.0 (#95) ([0a1a581](https://github.com/peaceiris/actions-gh-pages/commit/0a1a58196ba5bf48e168475e0ac3898fbd3043e2)), closes [#95](https://github.com/peaceiris/actions-gh-pages/issues/95)
* bump husky from 4.2.1 to 4.2.3 (#102) ([49a6939](https://github.com/peaceiris/actions-gh-pages/commit/49a6939dbb77d7656228cdc3bed6a99d5124a6b2)), closes [#102](https://github.com/peaceiris/actions-gh-pages/issues/102)
* bump node from 12.14.1 to 12.15.0 (#94) ([0e542f9](https://github.com/peaceiris/actions-gh-pages/commit/0e542f9f9231c005e1a6363a33a69fdbde436085)), closes [#94](https://github.com/peaceiris/actions-gh-pages/issues/94)
### docs
* fix ([60c31d2](https://github.com/peaceiris/actions-gh-pages/commit/60c31d23a8a096624a3b9a0955a05ea9941dc140))
* rename author to Maintainer ([4101589](https://github.com/peaceiris/actions-gh-pages/commit/41015898aad0abad9d0760bc576e4748e476d4f9))
* update job name ([752214a](https://github.com/peaceiris/actions-gh-pages/commit/752214aa33756f6e097f908671681a13865a9991))
* update publish_branch for v3 ([a7866b5](https://github.com/peaceiris/actions-gh-pages/commit/a7866b5bd3a121a460c8c39cb1c9d1586db6b231))
* update status of github_token ([1887981](https://github.com/peaceiris/actions-gh-pages/commit/1887981f72e59b54f68febb4fa4786e7e153ef6d))
### fix
* Add removing workDir at the end ([5ba5849](https://github.com/peaceiris/actions-gh-pages/commit/5ba5849ab229d5b6eecc1d13de82e71999961cdc))
* Change final message ([476fa94](https://github.com/peaceiris/actions-gh-pages/commit/476fa94197aea4d3f74e5619ae77ebf966fd5fff))
* tag fetching ([6595e02](https://github.com/peaceiris/actions-gh-pages/commit/6595e02d683d6ca8275d76e2818662da80ac685a))
* tag fetching ([6fe5c9e](https://github.com/peaceiris/actions-gh-pages/commit/6fe5c9e76213b6d5bc542be649cbe0289e947ab6))
### refactor
* fix typo and remove useless function (#107) ([55a68e3](https://github.com/peaceiris/actions-gh-pages/commit/55a68e34ca406d99b5b2a4549d7ade5eeb03d860)), closes [#107](https://github.com/peaceiris/actions-gh-pages/issues/107)
## [3.0.3](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.3-0...v3.0.3) (2020-02-06)
### docs
* update example of publish_branch ([2948e5e](https://github.com/peaceiris/actions-gh-pages/commit/2948e5eda85d99ffc20cda677353918ea9ea3f45))
## [3.0.3-0](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.2...v3.0.3-0) (2020-02-06)
### fix
* Enable to create branch for first deployment (#92) ([1b6740c](https://github.com/peaceiris/actions-gh-pages/commit/1b6740cb30fc6a5a695a015144589862eb241b7d)), closes [#92](https://github.com/peaceiris/actions-gh-pages/issues/92)
## [3.0.2](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.1...v3.0.2) (2020-02-05)
### ci
* use github_token for windows-latest ([cfdf8c4](https://github.com/peaceiris/actions-gh-pages/commit/cfdf8c43ed170ce3bcfc1b4ee5ba50000e89f9e7))
### docs
* Add CodeFactor badge ([0ba5bf3](https://github.com/peaceiris/actions-gh-pages/commit/0ba5bf3eeb5f0ad9e42dc6344afa736b47dac67f))
* Add Supported Platforms table ([f0177d1](https://github.com/peaceiris/actions-gh-pages/commit/f0177d176f9464c11cbdff5a68dbecd6e630e371))
* update log example for v3 ([d35854b](https://github.com/peaceiris/actions-gh-pages/commit/d35854bdf87ba4311c5b5ba738260e4eb89c2295))
### fix
* add debug ([fb54d6a](https://github.com/peaceiris/actions-gh-pages/commit/fb54d6af4d2abbf7a42806620594b173c2f55882))
* add filePath ([f8b5a36](https://github.com/peaceiris/actions-gh-pages/commit/f8b5a36401de48c3bf2fda47a51b010350405163))
* copy directories #89 ([6edc4c9](https://github.com/peaceiris/actions-gh-pages/commit/6edc4c976449147551137b19eb7bc092d9d129ec)), closes [#89](https://github.com/peaceiris/actions-gh-pages/issues/89)
* copy force ([848165c](https://github.com/peaceiris/actions-gh-pages/commit/848165cf9f01c61b1f2e83d433177a9f46ce5ea7))
## [3.0.1](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.0...v3.0.1) (2020-02-05)
### docs
* Add link to v2 ([ec95e8e](https://github.com/peaceiris/actions-gh-pages/commit/ec95e8e7aae2075200c33461a0f3aa640d7fbe02))
* remove Script mode section ([9b3fcdf](https://github.com/peaceiris/actions-gh-pages/commit/9b3fcdf51572449ce5f346724d01e878bd811834))
* remove v2 example ([a1375a4](https://github.com/peaceiris/actions-gh-pages/commit/a1375a463794f123e06ddb6af0d74ef453d74fa0))
* update ([1a26eac](https://github.com/peaceiris/actions-gh-pages/commit/1a26eaca33cf4f1d162fc37fd45cab6ea999140e))
* update for v3 ([1a13108](https://github.com/peaceiris/actions-gh-pages/commit/1a1310886515195d8b9052e68aec5a973dd3779d))
* update for v3 ([d0de38a](https://github.com/peaceiris/actions-gh-pages/commit/d0de38a352de7896c0bc618c3977f00f6a34151d))
* update for v3 ([b3cfcb1](https://github.com/peaceiris/actions-gh-pages/commit/b3cfcb13c0e3d5b76fb2b306fafbc0bfdc349e2e))
* update for v3 ([b1aaa85](https://github.com/peaceiris/actions-gh-pages/commit/b1aaa85b6766b71fd96a06d1ea8a99a5247e7b6c))
* update for v3 ([f1e7cd6](https://github.com/peaceiris/actions-gh-pages/commit/f1e7cd608c631ec6a3c48e1e76f17b6c8a468ada))
* update for v3 ([07a3f29](https://github.com/peaceiris/actions-gh-pages/commit/07a3f2915ef742feb191caf4315f92c5dbe24657))
* update for v3 ([02c3858](https://github.com/peaceiris/actions-gh-pages/commit/02c38586a5b45e217af006473aa99749917bce73))
* update for v3 ([59bbb98](https://github.com/peaceiris/actions-gh-pages/commit/59bbb98387fa6cde2495176555efd39a3c68b6b5))
* update for v3 ([be27dcc](https://github.com/peaceiris/actions-gh-pages/commit/be27dcce4894bf0847e64b2ba676b9de08979d21))
* update for v3 ([ccf71d1](https://github.com/peaceiris/actions-gh-pages/commit/ccf71d1162ce030d5f8aa4bb1e05c45d83912c67))
* update for v3 ([5fe4aa3](https://github.com/peaceiris/actions-gh-pages/commit/5fe4aa3f24fd2a3f7cf683b04c29895c6882c5de))
* update for v3 ([428902c](https://github.com/peaceiris/actions-gh-pages/commit/428902c6cd381168d113898fa3fd53e83ca658b2))
* update for v3 ([00bca7b](https://github.com/peaceiris/actions-gh-pages/commit/00bca7b88cea3a6aff0cd9e90cc297f90981dfe8))
* update GitHub Actions badge ([9cec798](https://github.com/peaceiris/actions-gh-pages/commit/9cec79845182679864d2e9f2b137c1829773b4a0))
* update overview ([c940278](https://github.com/peaceiris/actions-gh-pages/commit/c940278a4c780afbd658b4a3f0f7834039913401))
### feat
* Add getHomeDir() for windows (#86) ([ed21b6a](https://github.com/peaceiris/actions-gh-pages/commit/ed21b6a5942b1be9f75103a2661d908d41ed9ea9)), closes [#86](https://github.com/peaceiris/actions-gh-pages/issues/86)
### refactor
* change to core.debug ([9f11da8](https://github.com/peaceiris/actions-gh-pages/commit/9f11da81ae3ead3c8929c35266dd40a0ddfd2bd1))
# [3.0.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.0-1...v3.0.0) (2020-02-05)
### ci
* force_orphan to false ([a150e4e](https://github.com/peaceiris/actions-gh-pages/commit/a150e4e690ab9bfcecae05b68c8efd14edac15df))
### fix
* action title ([0629bab](https://github.com/peaceiris/actions-gh-pages/commit/0629babb090ceea68f118101b903a8e6798b2962))
# [3.0.0-1](https://github.com/peaceiris/actions-gh-pages/compare/v2.10.1...v3.0.0-1) (2020-02-05)
@@ -22,285 +357,3 @@ All notable changes to this project will be documented in this file. See [standa
### feat
* Add TypeScript Action (#83) ([68b21c1](https://github.com/peaceiris/actions-gh-pages/commit/68b21c12af25bc606f77a7b5674f162f3a17bf22)), closes [#83](https://github.com/peaceiris/actions-gh-pages/issues/83) [#54](https://github.com/peaceiris/actions-gh-pages/issues/54)
## [3.1.12](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.11...v3.1.12) (2020-02-05)
### fix
* add new line, ssh-keyscan comment ([1333ef6](https://github.com/peaceiris/actions-gh-pages/commit/1333ef6f810edd7fd42a56b786be33553dcbb45a))
## [3.1.11](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.10...v3.1.11) (2020-02-05)
### fix
* ssh-agent ([4fce94b](https://github.com/peaceiris/actions-gh-pages/commit/4fce94b01d6ac5a2ad6f1599c32e4060ed8b5936))
## [3.1.10](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.9...v3.1.10) (2020-02-05)
### fix
* change writeFile to writeFileSync ([57d9579](https://github.com/peaceiris/actions-gh-pages/commit/57d9579cc71fe2a71e82a47ce2b7ad990db16406))
## [3.1.9](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.8...v3.1.9) (2020-02-05)
### fix
* Add chmod 600 known_hosts ([24a9ba2](https://github.com/peaceiris/actions-gh-pages/commit/24a9ba28d32d735d348f3c82914ac0f9216a8e12))
## [3.1.8](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.7...v3.1.8) (2020-02-04)
### fix
* add trim() ([7d8f676](https://github.com/peaceiris/actions-gh-pages/commit/7d8f676353dd2ed195b94ff31580ee91796e5214))
## [3.1.7](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.6...v3.1.7) (2020-02-04)
## [3.1.6](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.5...v3.1.6) (2020-02-04)
## [3.1.5](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.4...v3.1.5) (2020-02-04)
### fix
* 400 to 600 ([e2d8266](https://github.com/peaceiris/actions-gh-pages/commit/e2d8266ff7ce8f641ac66436e895b1b4d705a4cf))
## [3.1.4](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.3...v3.1.4) (2020-02-04)
### fix
* github ([4e0ba00](https://github.com/peaceiris/actions-gh-pages/commit/4e0ba002422edc2c4e61aefd3ac1e478d23afff7))
## [3.1.3](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.2...v3.1.3) (2020-02-04)
### fix
* add await ([8f3dfcb](https://github.com/peaceiris/actions-gh-pages/commit/8f3dfcbfc2b7294aed82f40ce3b8cd277b927a80))
* add await ([8a3c589](https://github.com/peaceiris/actions-gh-pages/commit/8a3c58984088ea08b176dd81eb35f8bd3895a146))
* add eval SSH_AUTH_SOCK=/var/folders/kq/plr51cwn7ql9dh5m035_2fsh0000gn/T//ssh-iXC8tDO67Brj/agent.73139; export SSH_AUTH_SOCK; ([06e73f4](https://github.com/peaceiris/actions-gh-pages/commit/06e73f4286867c4fe3e3b8d48b70db1d9d33f608))
* add sh -c 'eval SSH_AUTH_SOCK=/var/folders/kq/plr51cwn7ql9dh5m035_2fsh0000gn/T//ssh-BEHc8SfUWzKd/agent.74533; export SSH_AUTH_SOCK; ([114d174](https://github.com/peaceiris/actions-gh-pages/commit/114d17483f85fbf60a92972c969cd49d799abe59))
* add sh -c eval SSH_AUTH_SOCK=/var/folders/kq/plr51cwn7ql9dh5m035_2fsh0000gn/T//ssh-LTfBLKFbp39Z/agent.73455; export SSH_AUTH_SOCK; ([df63091](https://github.com/peaceiris/actions-gh-pages/commit/df630915f2c1a31ee3acb55420294ad5dd1e089e))
* add SSH_AUTH_SOCK ([fb0c9f1](https://github.com/peaceiris/actions-gh-pages/commit/fb0c9f1ebc41727c6205c50f667e907bbd824888))
* Add ssh-add ([c19aace](https://github.com/peaceiris/actions-gh-pages/commit/c19aace6828eaccbf0f2516053ad172704608b72))
* cpexec ([30e98db](https://github.com/peaceiris/actions-gh-pages/commit/30e98dba8efdbd38275f0a7ceb49d6e1449f2dca))
* cpexec ([63697ad](https://github.com/peaceiris/actions-gh-pages/commit/63697adefcc1762fcb07102a858a895b7e435fca))
* eval ([d696db2](https://github.com/peaceiris/actions-gh-pages/commit/d696db2c8d77159fcb9ef211abb489c757f3a85e))
* ssh-agent ([9406f9d](https://github.com/peaceiris/actions-gh-pages/commit/9406f9d108a44c5e0a90b41c5817f84ac9ba7006))
* ssh-agent ([db62914](https://github.com/peaceiris/actions-gh-pages/commit/db6291436b37e56847cee67374247477113d6c43))
## [3.1.2](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.1...v3.1.2) (2020-02-04)
### fix
* ssh config ([5d7baea](https://github.com/peaceiris/actions-gh-pages/commit/5d7baea212a39da311412fb263b5ae473025d80d))
## [3.1.1](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.0...v3.1.1) (2020-02-04)
### fix
* externalRepository commit message ([3438ab5](https://github.com/peaceiris/actions-gh-pages/commit/3438ab53a11067fd38f0a0491ed0c67b61c1ecc1))
# [3.1.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.0-2...v3.1.0) (2020-02-04)
### chore
* Add engines field ([f27f5d1](https://github.com/peaceiris/actions-gh-pages/commit/f27f5d17579b2cd9497bb90de673e5bf68683db3)), closes [#12](https://github.com/peaceiris/actions-gh-pages/issues/12)
* Add latest git (#14) ([cba55a7](https://github.com/peaceiris/actions-gh-pages/commit/cba55a7c9634dfaf3fa0f879f28481c775acd022)), closes [#14](https://github.com/peaceiris/actions-gh-pages/issues/14) [#6](https://github.com/peaceiris/actions-gh-pages/issues/6)
### deps
* bump @types/node from 13.5.0 to 13.5.1 (#13) ([0e5e067](https://github.com/peaceiris/actions-gh-pages/commit/0e5e0674725a6f230c077eb3d42ba9cd744f3f33)), closes [#13](https://github.com/peaceiris/actions-gh-pages/issues/13)
* update ([6b2b219](https://github.com/peaceiris/actions-gh-pages/commit/6b2b21931c7f2d3e6c8bb103d8911c7db5e1640c))
* update ([825291d](https://github.com/peaceiris/actions-gh-pages/commit/825291d6f44b996e6798a185649148d95c2113a0))
* update ([5f81e04](https://github.com/peaceiris/actions-gh-pages/commit/5f81e04c5392575d3b7a0e0c19dba9b6e12a1552))
### feat
* Add ForceOrphan ([72a38e1](https://github.com/peaceiris/actions-gh-pages/commit/72a38e1a66d6e92e1f5cc4e6517736302350769b))
* add tag ([cb0ae4b](https://github.com/peaceiris/actions-gh-pages/commit/cb0ae4b051357b3950eaad0694e5280685d02a65))
### fix
* action failure status (#15) ([5d770cf](https://github.com/peaceiris/actions-gh-pages/commit/5d770cf1a3f624f288aeb883120facd8bb9be0e3)), closes [#15](https://github.com/peaceiris/actions-gh-pages/issues/15)
* test 5 ([be72615](https://github.com/peaceiris/actions-gh-pages/commit/be726151a04188efc7817a2ea4a2fa6d5aab0f52))
* test 5 ([0c3cc92](https://github.com/peaceiris/actions-gh-pages/commit/0c3cc9261318d03f93ea9765c80416e02ac22850))
### test
* allowEmptyCommit ([dbe91b4](https://github.com/peaceiris/actions-gh-pages/commit/dbe91b4071cd17ef2e8ed2b15d7aa78ddc2fde31))
* fail (#17) ([102ec5a](https://github.com/peaceiris/actions-gh-pages/commit/102ec5a6faa411ded6dbd9dad2c9c90760b5f6aa)), closes [#17](https://github.com/peaceiris/actions-gh-pages/issues/17)
* name email ([4cfb699](https://github.com/peaceiris/actions-gh-pages/commit/4cfb6998408e2f5890ac8edfc2b2e21c6dff7ce3))
* name email ([699be58](https://github.com/peaceiris/actions-gh-pages/commit/699be586e2a51ecac66b0386d138977d96d0fb22))
* print context ([1f50fa1](https://github.com/peaceiris/actions-gh-pages/commit/1f50fa14ea101ba129d2df88456efbc8a1f44072))
* should fail ([b5ee9e2](https://github.com/peaceiris/actions-gh-pages/commit/b5ee9e26f781f5dd14ac31186394d6042a4007c6))
# [3.1.0-2](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.0-1...v3.1.0-2) (2020-01-29)
### chore
* Change update_schedule from weekly to daily ([705453e](https://github.com/peaceiris/actions-gh-pages/commit/705453ed379218c67346fb7a506672399fa2168c))
* fix .gitconfig path ([b4f3632](https://github.com/peaceiris/actions-gh-pages/commit/b4f363240e949127f3303265cd8c9d4b93659edf))
* ignore failure ([752186a](https://github.com/peaceiris/actions-gh-pages/commit/752186ab23060558eec454cca240c52dc0297626))
* remove jest from lint-staged ([67b2175](https://github.com/peaceiris/actions-gh-pages/commit/67b2175154855954c45d229c3c24df74a7069f8c))
* update name ([5524237](https://github.com/peaceiris/actions-gh-pages/commit/55242376750e5aa63d6b37c2f1ede2f4574cdff1))
* update name ([8894b54](https://github.com/peaceiris/actions-gh-pages/commit/8894b541cf0ba48e94b0243c087c2ff6a5acded0))
### ci
* update [skip ci] ([1356241](https://github.com/peaceiris/actions-gh-pages/commit/1356241728f741769f594e16afb333cda1b5af3d))
### deps
* bump @types/jest from 24.9.1 to 25.1.0 (#8) ([a129668](https://github.com/peaceiris/actions-gh-pages/commit/a129668d5a9918c74c0fc61a7b23d650134b9d14)), closes [#8](https://github.com/peaceiris/actions-gh-pages/issues/8)
* bump @typescript-eslint/eslint-plugin from 2.17.0 to 2.18.0 (#11) ([aeac583](https://github.com/peaceiris/actions-gh-pages/commit/aeac583956c2d4905809b6586dc0587dfd39770d)), closes [#11](https://github.com/peaceiris/actions-gh-pages/issues/11)
* bump @typescript-eslint/parser from 2.17.0 to 2.18.0 (#9) ([6304225](https://github.com/peaceiris/actions-gh-pages/commit/6304225bde576cdf74f51c252500092fc3c76c30)), closes [#9](https://github.com/peaceiris/actions-gh-pages/issues/9)
* bump lint-staged from 10.0.2 to 10.0.3 (#10) ([fd432ae](https://github.com/peaceiris/actions-gh-pages/commit/fd432aed6ca65dc463e7a260a4d646a04aac68d8)), closes [#10](https://github.com/peaceiris/actions-gh-pages/issues/10)
* update ([ff7a4e6](https://github.com/peaceiris/actions-gh-pages/commit/ff7a4e686ef1fe7d116a19ba0e19fe663469636c))
* update ([b7effe0](https://github.com/peaceiris/actions-gh-pages/commit/b7effe0abf1b31a36b83c045f94a3791e02794dd))
* update ([b9c97f9](https://github.com/peaceiris/actions-gh-pages/commit/b9c97f9966632cd170952b776cdee0adb5cb3f14))
### feat
* Add git config gc.auto 0 ([f9abca9](https://github.com/peaceiris/actions-gh-pages/commit/f9abca9aadadb1054f154d339787f6b931aca308))
### fix
* git config ([d0589ad](https://github.com/peaceiris/actions-gh-pages/commit/d0589ad8c164019045661a2d3f8298637bf4c38b))
* remove readonly ([ee2570d](https://github.com/peaceiris/actions-gh-pages/commit/ee2570d0b58bf3a538a419422502044a4823965a))
* remove readonly ([01fba98](https://github.com/peaceiris/actions-gh-pages/commit/01fba9884211afc67d08805d18a3b5cd21283c3f))
* string ([edb9ee4](https://github.com/peaceiris/actions-gh-pages/commit/edb9ee4c963e6b7437c6dde39d392af68e205748))
* string ([b6270ce](https://github.com/peaceiris/actions-gh-pages/commit/b6270cec5adc6c91a5e7a9b716a34d176d68cd2d))
### refactor
* Add readonly ([6b1fffd](https://github.com/peaceiris/actions-gh-pages/commit/6b1fffd0be9f9218319f3973a93a1af0b51e85cd))
### test
* 3 ([2b76677](https://github.com/peaceiris/actions-gh-pages/commit/2b766776185f09bfd9ad34f4bfb07f6526a1f172))
# [3.1.0-1](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.0-0...v3.1.0-1) (2020-01-19)
### docs
* Add link to deploy log ([0e0c184](https://github.com/peaceiris/actions-gh-pages/commit/0e0c184997116badf00f8624e0d04cc878783113))
### feat
* add [INFO] ([0187498](https://github.com/peaceiris/actions-gh-pages/commit/0187498430aafb5b45596e4ffb5fd0a392191edf))
* Add set-tokens ([91fa776](https://github.com/peaceiris/actions-gh-pages/commit/91fa77695d8aab239e82b2895232314a89c41dbc))
* Add setGitRepo() ([f8231fd](https://github.com/peaceiris/actions-gh-pages/commit/f8231fd0b4499fbf5557ce4e2d3845c61cfa5c8c))
### fix
* Add all process ([211e96c](https://github.com/peaceiris/actions-gh-pages/commit/211e96c1434130665ed5aa0573243bbebf6ea1bb))
* Add async ([6e386ad](https://github.com/peaceiris/actions-gh-pages/commit/6e386adb8066e50db1eb9ce961375bcc0c45d32d))
* Add await ([4b98a70](https://github.com/peaceiris/actions-gh-pages/commit/4b98a70318ea19803718f2e3edeced8add145838))
* Add createWorkDir() ([2aac9f0](https://github.com/peaceiris/actions-gh-pages/commit/2aac9f03a0ac6b0718c4f0a8071d1a9a97addaf2))
* Add GITHUB_WORKSPACE ([efe6506](https://github.com/peaceiris/actions-gh-pages/commit/efe6506cb90a49cf450734d506db5a3df7f51e59))
* Add ssh config ([a6d3d3e](https://github.com/peaceiris/actions-gh-pages/commit/a6d3d3e4e42821be48c08d1b2b51e22541218f58))
* Add String() ([b866328](https://github.com/peaceiris/actions-gh-pages/commit/b866328684445bbe1372fca34f3c41729b238348))
* default inputs ([d8f13a7](https://github.com/peaceiris/actions-gh-pages/commit/d8f13a7da3e38168db7d449af36da538b6317363))
* git remote add origin ([1fc54b7](https://github.com/peaceiris/actions-gh-pages/commit/1fc54b7b09d41769cd24be6860fabc13b3b74775))
* github_token ([682f359](https://github.com/peaceiris/actions-gh-pages/commit/682f35986da2437d9796e444193692051aefb957))
* known_hosts ([ba94b34](https://github.com/peaceiris/actions-gh-pages/commit/ba94b34d0c46dd02d05c132624dd3e8b1abe982c))
* known_hosts ([3d3740b](https://github.com/peaceiris/actions-gh-pages/commit/3d3740b76ddc79254803db70285bde6ea01818b1))
* known_hosts ([f0aff3b](https://github.com/peaceiris/actions-gh-pages/commit/f0aff3b9b5a1f3675a86581e4a3fd6e49f8b9937))
* known_hosts ([4b497e9](https://github.com/peaceiris/actions-gh-pages/commit/4b497e9bad639a684e924b8a6eb32bccb5a067c6))
* known_hosts ([38ac39e](https://github.com/peaceiris/actions-gh-pages/commit/38ac39e21706017c6922385d2965fda30d3cd630))
* known_hosts ([893792e](https://github.com/peaceiris/actions-gh-pages/commit/893792e38352754eb524ae47d4c452a1795265c6))
* known_hosts ([115a5c2](https://github.com/peaceiris/actions-gh-pages/commit/115a5c285a910b084a3d92e085b1d4e64b1b05e2))
* known_hosts ([19b48d9](https://github.com/peaceiris/actions-gh-pages/commit/19b48d9682e45da240d1fd2b7f427bd564561490))
* known_hosts ([304bf09](https://github.com/peaceiris/actions-gh-pages/commit/304bf09b95f89c149e2153f761c985af6d0f6922))
* known_hosts ([364d723](https://github.com/peaceiris/actions-gh-pages/commit/364d723459543f4d44374d85e750d41e225149c6))
* known_hosts ([949e934](https://github.com/peaceiris/actions-gh-pages/commit/949e93405eacf563eec9c7c6966ec545749563ae))
* known_hosts ([827d5ab](https://github.com/peaceiris/actions-gh-pages/commit/827d5ab6dd02137d659e104f066af63833c49664))
* log ([74780a7](https://github.com/peaceiris/actions-gh-pages/commit/74780a73cb8cb4128545616025d7160fbceecb38))
* log ([7ef7561](https://github.com/peaceiris/actions-gh-pages/commit/7ef75616138f3790ddad21479f80ee4ac62002ce))
* nothing to commit, working tree clean ([ba96387](https://github.com/peaceiris/actions-gh-pages/commit/ba963877e449ae0f01d68814625b2908546ca47f))
* nothing to commit, working tree clean ([2398872](https://github.com/peaceiris/actions-gh-pages/commit/23988721d63c6c138933b3e8395bf62b3a5d965b))
* print log ([b7acdc6](https://github.com/peaceiris/actions-gh-pages/commit/b7acdc6ed09daa1e90c1401ccef8ae062719d479))
* process.chdir workDir ([d9a7070](https://github.com/peaceiris/actions-gh-pages/commit/d9a707014eeffbd7aca63f7bc3b3744b88027b84))
* repo name ([b2e29d0](https://github.com/peaceiris/actions-gh-pages/commit/b2e29d00bdb276267fb6efb8945c3fd82d405fa8))
* ssh-agent ([9223cbb](https://github.com/peaceiris/actions-gh-pages/commit/9223cbbb24f4681add01cf67b49f76c918d69ba1))
* ssh-agent ([5f4184c](https://github.com/peaceiris/actions-gh-pages/commit/5f4184c4bedf628997d9726beb82bda5060ad620))
* ssh-agent ([09dd0ba](https://github.com/peaceiris/actions-gh-pages/commit/09dd0baa7842f85f7c15713d650421b3f7a791ce))
* ssh-agent ([8415fa0](https://github.com/peaceiris/actions-gh-pages/commit/8415fa096f53ed530ee1d0cb512159cf1bb81f8f))
* ssh-agent ([0764a18](https://github.com/peaceiris/actions-gh-pages/commit/0764a18fa15df76d7381b3f1b0ec3869b3d22939))
* ssh-agent ([7dcd208](https://github.com/peaceiris/actions-gh-pages/commit/7dcd2083831a0a1a5c57ebe7850114373c2806f9))
* ssh-agent ([a67fca3](https://github.com/peaceiris/actions-gh-pages/commit/a67fca3a04d8c2d19048b6d9b0180bea7f27cf43))
* ssh-agent ([643d9f1](https://github.com/peaceiris/actions-gh-pages/commit/643d9f13cc8f2e6fa9a75f5da3c0721da2caff7a))
* ssh-agent ([e6c82bb](https://github.com/peaceiris/actions-gh-pages/commit/e6c82bb3d6071d674e539c68ff0667cfd12784b6))
* ssh-agent ([6a06829](https://github.com/peaceiris/actions-gh-pages/commit/6a068296040d80f6f6ecf44357222a40392e0652))
* ssh-agent ([e669ac1](https://github.com/peaceiris/actions-gh-pages/commit/e669ac12f6613d1d2ad8514fff12b56b8d383242))
* Use child_process.exec for redirect ([5aa9ee0](https://github.com/peaceiris/actions-gh-pages/commit/5aa9ee04276459ab9d992d982913e97da3aabaec))
* workdir ([0ac4961](https://github.com/peaceiris/actions-gh-pages/commit/0ac496185112333ee0d09af6be9fc2dae715382b))
* write file ([c700df9](https://github.com/peaceiris/actions-gh-pages/commit/c700df9aed53a32ac8fa8c4521c767ca44d1a914))
### test
* 2 ([339a220](https://github.com/peaceiris/actions-gh-pages/commit/339a22020c35e097e0d5a0b1ac1410aac0b9baae))
* Add jest --detectOpenHandles ([ecb3731](https://github.com/peaceiris/actions-gh-pages/commit/ecb3731e33ddc7be05ecd9042c5d1d57b22c1bb3))
* Add mdbook build ([d614256](https://github.com/peaceiris/actions-gh-pages/commit/d614256de523aee4b24efb17b1f8cbd0f8dafd5c))
* Add mdbook test project ([e67298b](https://github.com/peaceiris/actions-gh-pages/commit/e67298b52fbb1f852337829c56c009e9910bcee2))
* github_token ([ac71046](https://github.com/peaceiris/actions-gh-pages/commit/ac71046bd26f10f8e3f375e97e326c2c9412349b))
* rename [skip ci] ([0a0d07f](https://github.com/peaceiris/actions-gh-pages/commit/0a0d07fece65e3748f99327243293abc034f7736))
* run ([f6502c1](https://github.com/peaceiris/actions-gh-pages/commit/f6502c151baf4edf6b3b745944b8d81cbe2364ac))
* v2 ([6123edd](https://github.com/peaceiris/actions-gh-pages/commit/6123edd7dfb9cbf8a0a6e6d356c9591cbf31bd8b))
* v3 ([b91823f](https://github.com/peaceiris/actions-gh-pages/commit/b91823f8862a7b6f65291ddcfada0c8b1850a374))
# [3.1.0-0](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.0...v3.1.0-0) (2020-01-18)
### chore
* Add v3.0.0 ([234c7ca](https://github.com/peaceiris/actions-gh-pages/commit/234c7cab06f27ff81cad729c6ddf850362ffde7a))
# Changelog

View File

@@ -10,11 +10,13 @@ RUN apt-get update && \
libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev autoconf \
ca-certificates \
wget \
ssh && \
rm -rf /var/lib/apt/lists/*
ssh \
vim && \
rm -rf /var/lib/apt/lists/* && \
npm i -g npm
WORKDIR /git
ENV GIT_VERSION="2.25.0"
ENV GIT_VERSION="2.25.1"
RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
tar -zxf "./v${GIT_VERSION}.tar.gz" && \
rm "./v${GIT_VERSION}.tar.gz" && \

1126
README.md

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +1,107 @@
// import * as main from '../src/main';
import {Inputs} from '../src/interfaces';
import {getInputs} from '../src/get-inputs';
import {showInputs, getInputs} from '../src/get-inputs';
import os from 'os';
import fs from 'fs';
import yaml from 'js-yaml';
beforeEach(() => {
jest.resetModules();
process.stdout.write = jest.fn();
const doc = yaml.safeLoad(
fs.readFileSync(__dirname + '/../action.yml', 'utf8')
);
Object.keys(doc.inputs).forEach(name => {
const envVar = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
process.env[envVar] = doc.inputs[name]['default'];
});
});
afterEach(() => {
delete process.env['INPUT_DEPLOY_KEY'];
delete process.env['INPUT_GITHUB_TOKEN'];
delete process.env['INPUT_PERSONAL_TOKEN'];
delete process.env['INPUT_PUBLISH_BRANCH'];
delete process.env['INPUT_PUBLISH_DIR'];
delete process.env['INPUT_EXTERNAL_REPOSITORY'];
delete process.env['INPUT_ALLOW_EMPTY_COMMIT'];
delete process.env['INPUT_KEEP_FILES'];
delete process.env['INPUT_FORCE_ORPHAN'];
delete process.env['INPUT_USER_NAME'];
delete process.env['INPUT_USER_EMAIL'];
delete process.env['INPUT_COMMIT_MESSAGE'];
delete process.env['INPUT_TAG_NAME'];
delete process.env['INPUT_TAG_MESSAGE'];
const doc = yaml.safeLoad(
fs.readFileSync(__dirname + '/../action.yml', 'utf8')
);
Object.keys(doc.inputs).forEach(name => {
const envVar = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
console.debug(`delete ${envVar}\t${process.env[envVar]}`);
delete process.env[envVar];
});
});
// Assert that process.stdout.write calls called only with the given arguments.
// cf. https://github.com/actions/toolkit/blob/8b0300129f08728419263b016de8630f1d426d5f/packages/core/__tests__/core.test.ts
function assertWriteCalls(calls: string[]): void {
expect(process.stdout.write).toHaveBeenCalledTimes(calls.length);
for (let i = 0; i < calls.length; i++) {
expect(process.stdout.write).toHaveBeenNthCalledWith(i + 1, calls[i]);
}
}
function getInputsLog(authMethod: string, inps: Inputs): string {
return `\
[INFO] ${authMethod}: true
[INFO] PublishBranch: ${inps.PublishBranch}
[INFO] PublishDir: ${inps.PublishDir}
[INFO] ExternalRepository: ${inps.ExternalRepository}
[INFO] AllowEmptyCommit: ${inps.AllowEmptyCommit}
[INFO] KeepFiles: ${inps.KeepFiles}
[INFO] ForceOrphan: ${inps.ForceOrphan}
[INFO] UserName: ${inps.UserName}
[INFO] UserEmail: ${inps.UserEmail}
[INFO] CommitMessage: ${inps.CommitMessage}
[INFO] TagName: ${inps.TagName}
[INFO] TagMessage: ${inps.TagMessage}
[INFO] EnableJekyll (DisableNoJekyll): ${inps.DisableNoJekyll}
[INFO] CNAME: ${inps.CNAME}
`;
}
describe('showInputs()', () => {
// eslint-disable-next-line jest/expect-expect
test('print all inputs DeployKey', () => {
process.env['INPUT_DEPLOY_KEY'] = 'test_deploy_key';
const inps: Inputs = getInputs();
showInputs(inps);
const authMethod = 'DeployKey';
const test = getInputsLog(authMethod, inps);
assertWriteCalls([`${test}${os.EOL}`]);
});
// eslint-disable-next-line jest/expect-expect
test('print all inputs GithubToken', () => {
delete process.env['INPUT_DEPLOY_KEY'];
process.env['INPUT_GITHUB_TOKEN'] = 'test_github_token';
const inps: Inputs = getInputs();
showInputs(inps);
const authMethod = 'GithubToken';
const test = getInputsLog(authMethod, inps);
assertWriteCalls([`${test}${os.EOL}`]);
});
// eslint-disable-next-line jest/expect-expect
test('print all inputs PersonalToken', () => {
delete process.env['INPUT_DEPLOY_KEY'];
delete process.env['INPUT_GITHUB_TOKEN'];
process.env['INPUT_PERSONAL_TOKEN'] = 'test_personal_token';
const inps: Inputs = getInputs();
showInputs(inps);
const authMethod = 'PersonalToken';
const test = getInputsLog(authMethod, inps);
assertWriteCalls([`${test}${os.EOL}`]);
});
});
describe('getInputs()', () => {
test('get default inputs', () => {
process.env['INPUT_DEPLOY_KEY'] = 'test_deploy_key';
// process.env['INPUT_GITHUB_TOKEN'] = 'test_github_token';
// process.env['INPUT_PERSONAL_TOKEN'] = 'test_personal_token';
process.env['INPUT_PUBLISH_BRANCH'] = 'gh-pages';
process.env['INPUT_PUBLISH_DIR'] = 'public';
// process.env['INPUT_EXTERNAL_REPOSITORY'] = 'user/repo';
// process.env['INPUT_ALLOW_EMPTY_COMMIT'] = 'true';
// process.env['INPUT_KEEP_FILES'] = 'true';
// process.env['INPUT_FORCE_ORPHAN'] = 'true';
// process.env['INPUT_USER_NAME'] = 'username';
// process.env['INPUT_USER_EMAIL'] = 'github@github.com';
// process.env['INPUT_COMMIT_MESSAGE'] = 'feat: Add new feature';
// process.env['INPUT_TAG_NAME'] = 'deploy-v1.2.3';
// process.env['INPUT_TAG_MESSAGE'] = 'Deployment v1.2.3';
const inps: Inputs = getInputs();
@@ -56,6 +119,8 @@ describe('getInputs()', () => {
expect(inps.CommitMessage).toMatch('');
expect(inps.TagName).toMatch('');
expect(inps.TagMessage).toMatch('');
expect(inps.DisableNoJekyll).toBe(false);
expect(inps.CNAME).toMatch('');
});
test('get spec inputs', () => {
@@ -73,6 +138,8 @@ describe('getInputs()', () => {
process.env['INPUT_COMMIT_MESSAGE'] = 'feat: Add new feature';
process.env['INPUT_TAG_NAME'] = 'deploy-v1.2.3';
process.env['INPUT_TAG_MESSAGE'] = 'Deployment v1.2.3';
process.env['INPUT_DISABLE_NOJEKYLL'] = 'true';
process.env['INPUT_CNAME'] = 'github.com';
const inps: Inputs = getInputs();
@@ -90,5 +157,17 @@ describe('getInputs()', () => {
expect(inps.CommitMessage).toMatch('feat: Add new feature');
expect(inps.TagName).toMatch('deploy-v1.2.3');
expect(inps.TagMessage).toMatch('Deployment v1.2.3');
expect(inps.DisableNoJekyll).toBe(true);
expect(inps.CNAME).toMatch('github.com');
});
test('throw error enable_jekyll or disable_nojekyll', () => {
process.env['INPUT_DEPLOY_KEY'] = 'test_deploy_key';
process.env['INPUT_ENABLE_JEKYLL'] = 'true';
process.env['INPUT_DISABLE_NOJEKYLL'] = 'true';
expect(() => {
getInputs();
}).toThrowError('Use either of enable_jekyll or disable_nojekyll');
});
});

View File

@@ -1,32 +0,0 @@
// import {run} from '../src/main';
beforeEach(() => {
jest.resetModules();
});
afterEach(() => {
delete process.env['INPUT_DEPLOY_KEY'];
delete process.env['INPUT_GITHUB_TOKEN'];
delete process.env['INPUT_PERSONAL_TOKEN'];
delete process.env['INPUT_PUBLISH_BRANCH'];
delete process.env['INPUT_PUBLISH_DIR'];
delete process.env['INPUT_EXTERNAL_REPOSITORY'];
delete process.env['INPUT_ALLOW_EMPTY_COMMIT'];
delete process.env['INPUT_KEEP_FILES'];
delete process.env['INPUT_FORCE_ORPHAN'];
delete process.env['INPUT_USER_NAME'];
delete process.env['INPUT_USER_EMAIL'];
delete process.env['INPUT_COMMIT_MESSAGE'];
delete process.env['INPUT_TAG_NAME'];
delete process.env['INPUT_TAG_MESSAGE'];
delete process.env['INPUT_TAG_OVERWRITE'];
});
describe('Integration testing run()', () => {
test('succeed in pushing using deploy key', async () => {
// process.env['INPUT_DEPLOY_KEY'] = 'test_deploy_key';
// process.env['GITHUB_REPOSITORY'] = 'owner/repo';
// const exitcode = await run();
expect(0).toBe(0);
});
});

View File

@@ -0,0 +1,105 @@
import {
getPublishRepo,
setPersonalToken,
setGithubToken
} from '../src/set-tokens';
beforeEach(() => {
jest.resetModules();
});
// afterEach(() => {
// });
describe('getPublishRepo()', () => {
test('return repository name', () => {
const test = getPublishRepo('', 'owner', 'repo');
expect(test).toMatch('owner/repo');
});
test('return external repository name', () => {
const test = getPublishRepo('extOwner/extRepo', 'owner', 'repo');
expect(test).toMatch('extOwner/extRepo');
});
});
describe('setGithubToken()', () => {
test('return remote url with GITHUB_TOKEN gh-pages', () => {
const expected =
'https://x-access-token:GITHUB_TOKEN@github.com/owner/repo.git';
const test = setGithubToken(
'GITHUB_TOKEN',
'owner/repo',
'gh-pages',
'',
'refs/heads/master',
'push'
);
expect(test).toMatch(expected);
});
test('return remote url with GITHUB_TOKEN master', () => {
const expected =
'https://x-access-token:GITHUB_TOKEN@github.com/owner/repo.git';
const test = setGithubToken(
'GITHUB_TOKEN',
'owner/repo',
'master',
'',
'refs/heads/source',
'push'
);
expect(test).toMatch(expected);
});
test('throw error master to master', () => {
expect(() => {
setGithubToken(
'GITHUB_TOKEN',
'owner/repo',
'master',
'',
'refs/heads/master',
'push'
);
}).toThrowError('You deploy from master to master');
});
test('throw error external repository with GITHUB_TOKEN', () => {
expect(() => {
setGithubToken(
'GITHUB_TOKEN',
'owner/repo',
'gh-pages',
'extOwner/extRepo',
'refs/heads/master',
'push'
);
}).toThrowError(
'GITHUB_TOKEN does not support to push to an external repository'
);
});
test('return remote url with GITHUB_TOKEN pull_request', () => {
const expected =
'https://x-access-token:GITHUB_TOKEN@github.com/owner/repo.git';
const test = setGithubToken(
'GITHUB_TOKEN',
'owner/repo',
'gh-pages',
'',
'refs/pull/29/merge',
'pull_request'
);
expect(test).toMatch(expected);
});
});
describe('setPersonalToken()', () => {
test('return remote url with personal access token', () => {
const expected = 'https://x-access-token:pat@github.com/owner/repo.git';
const test = setPersonalToken('pat', 'owner/repo');
expect(test).toMatch(expected);
});
});

205
__tests__/utils.test.ts Normal file
View File

@@ -0,0 +1,205 @@
import path from 'path';
import fs from 'fs';
import {
getHomeDir,
getWorkDirName,
createWorkDir,
addNoJekyll,
addCNAME
} from '../src/utils';
beforeEach(() => {
jest.resetModules();
});
// afterEach(() => {
// });
async function getTime(): Promise<string> {
const date = new Date();
const unixTime = date.getTime();
return `${unixTime}`;
}
describe('getHomeDir()', () => {
test('get home directory name', async () => {
let test = '';
if (process.platform === 'win32') {
test = 'C:\\Users\\runneradmin';
} else {
test = `${process.env.HOME}`;
}
const expected = await getHomeDir();
expect(test).toMatch(expected);
});
});
describe('getWorkDirName()', () => {
test('get work directory name', async () => {
let home = '';
if (process.platform === 'win32') {
home = 'C:\\Users\\runneradmin';
} else {
home = `${process.env.HOME}`;
}
const unixTime = await getTime();
const expected = path.join(home, `actions_github_pages_${unixTime}`);
const test = await getWorkDirName(`${unixTime}`);
expect(test).toMatch(expected);
});
});
describe('createWorkDir()', () => {
test('create work directory', async () => {
const unixTime = await getTime();
const workDirName = await getWorkDirName(`${unixTime}`);
await createWorkDir(workDirName);
const test = fs.existsSync(workDirName);
expect(test).toBe(true);
});
});
async function getWorkDir(): Promise<string> {
const unixTime = await getTime();
let workDir = '';
workDir = await getWorkDirName(`${unixTime}`);
await createWorkDir(workDir);
return workDir;
}
describe('addNoJekyll()', () => {
test('add .nojekyll gh-pages', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, '.nojekyll');
await addNoJekyll(workDir, false, 'gh-pages');
const test = fs.existsSync(filepath);
expect(test).toBe(true);
fs.unlinkSync(filepath);
});
test('add .nojekyll master', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, '.nojekyll');
await addNoJekyll(workDir, false, 'master');
const test = fs.existsSync(filepath);
expect(test).toBe(true);
fs.unlinkSync(filepath);
});
test('.nojekyll already exists', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, '.nojekyll');
fs.closeSync(fs.openSync(filepath, 'w'));
await addNoJekyll(workDir, false, 'master');
const test = fs.existsSync(filepath);
expect(test).toBe(true);
fs.unlinkSync(filepath);
});
test('not add .nojekyll disable_nojekyll gh-pages', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, '.nojekyll');
await addNoJekyll(workDir, true, 'gh-pages');
const test = fs.existsSync(filepath);
expect(test).toBe(false);
});
test('not add .nojekyll disable_nojekyll master', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, '.nojekyll');
await addNoJekyll(workDir, true, 'master');
const test = fs.existsSync(filepath);
expect(test).toBe(false);
});
test('not add .nojekyll other-branch', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, '.nojekyll');
await addNoJekyll(workDir, false, 'other-branch');
const test = fs.existsSync(filepath);
expect(test).toBe(false);
});
test('not add .nojekyll disable_nojekyll other-branch', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, '.nojekyll');
await addNoJekyll(workDir, true, 'other-branch');
const test = fs.existsSync(filepath);
expect(test).toBe(false);
});
});
describe('addCNAME()', () => {
test('add CNAME', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, 'CNAME');
await addCNAME(workDir, 'github.com');
const test = fs.readFileSync(filepath, 'utf8');
expect(test).toMatch('github.com');
fs.unlinkSync(filepath);
});
test('do nothing', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, 'CNAME');
await addCNAME(workDir, '');
const test = fs.existsSync(filepath);
expect(test).toBe(false);
});
test('CNAME already exists', async () => {
let workDir = '';
(async (): Promise<void> => {
workDir = await getWorkDir();
})();
const filepath = path.join(workDir, 'CNAME');
await addCNAME(workDir, 'github.io');
await addCNAME(workDir, 'github.com');
const test = fs.readFileSync(filepath, 'utf8');
expect(test).toMatch('github.io');
fs.unlinkSync(filepath);
});
});

View File

@@ -1,4 +1,4 @@
name: 'GitHub Pages v3'
name: 'GitHub Pages action'
description: 'GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.'
author: 'peaceiris'
runs:
@@ -9,24 +9,24 @@ branding:
color: 'blue'
inputs:
deploy_key:
description: ''
description: 'Set a SSH private key from repository secret value for pushing to the remote branch.'
required: false
github_token:
description: ''
description: 'Set a generated GITHUB_TOKEN for pushing to the remote branch.'
required: false
personal_token:
description: ''
description: 'Set a personal access token for pushing to the remote branch.'
required: false
publish_branch:
description: ''
description: 'Set a target branch for deployment.'
required: false
default: 'gh-pages'
publish_dir:
description: ''
description: 'Set an input directory for deployment.'
required: false
default: 'public'
external_repository:
description: ''
description: 'Set an external repository (owner/repo).'
required: false
allow_empty_commit:
description: 'If empty commits should be made to the publication branch'
@@ -55,3 +55,14 @@ inputs:
tag_message:
description: 'Set tag message'
required: false
enable_jekyll:
description: 'Enable the GitHub Pages built-in Jekyll'
required: false
default: 'false'
disable_nojekyll:
description: 'An alias for enable_jekyll to disable adding .nojekyll file to master or gh-pages branches'
required: false
default: 'false'
cname:
description: 'Set custom domain'
required: false

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
images/log_overview.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
images/log_success.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
images/settings_select.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

215
package-lock.json generated
View File

@@ -1,13 +1,13 @@
{
"name": "actions-github-pages",
"version": "3.0.0-1",
"version": "3.5.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@actions/core": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz",
"integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg=="
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz",
"integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w=="
},
"@actions/exec": {
"version": "1.0.3",
@@ -18,22 +18,13 @@
}
},
"@actions/github": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-2.1.0.tgz",
"integrity": "sha512-G4ncMlh4pLLAvNgHUYUtpWQ1zPf/VYqmRH9oshxLabdaOOnp7i1hgSgzr2xne2YUaSND3uqemd3YYTIsm2f/KQ==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-2.1.1.tgz",
"integrity": "sha512-kAgTGUx7yf5KQCndVeHSwCNZuDBvPyxm5xKTswW2lofugeuC1AZX73nUUVDNaysnM9aKFMHv9YCdVJbg7syEyA==",
"requires": {
"@actions/http-client": "^1.0.3",
"@octokit/graphql": "^4.3.1",
"@octokit/rest": "^16.15.0"
}
},
"@actions/glob": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.1.0.tgz",
"integrity": "sha512-lx8SzyQ2FE9+UUvjqY1f28QbTJv+w8qP7kHHbfQRhphrlcx0Mdmm1tZdGJzfxv1jxREa/sLW4Oy8CbGQKCJySA==",
"requires": {
"@actions/core": "^1.2.0",
"minimatch": "^3.0.4"
"@octokit/rest": "^16.43.1"
}
},
"@actions/http-client": {
@@ -749,15 +740,21 @@
}
},
"@types/jest": {
"version": "25.1.1",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.1.1.tgz",
"integrity": "sha512-bKSZJYZJLzwaoVYNN4W3A0RvKNYsrLm5tsuXaMlfYDxKf4gY2sFrMYneCugNQWGg1gjPW+FHBwNrwPzEi4sIsw==",
"version": "25.1.4",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.1.4.tgz",
"integrity": "sha512-QDDY2uNAhCV7TMCITrxz+MRk1EizcsevzfeS6LykIlq2V1E5oO4wXG8V2ZEd9w7Snxeeagk46YbMgZ8ESHx3sw==",
"dev": true,
"requires": {
"jest-diff": "^25.1.0",
"pretty-format": "^25.1.0"
}
},
"@types/js-yaml": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.12.2.tgz",
"integrity": "sha512-0CFu/g4mDSNkodVwWijdlr8jH7RoplRWNgovjFLEZeT+QEbbZXjBmCe3HwaWheAlCbHwomTwzZoSedeOycABug==",
"dev": true
},
"@types/json-schema": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz",
@@ -765,9 +762,9 @@
"dev": true
},
"@types/node": {
"version": "13.7.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.0.tgz",
"integrity": "sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ=="
"version": "12.12.29",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.29.tgz",
"integrity": "sha512-yo8Qz0ygADGFptISDj3pOC9wXfln/5pQaN/ysDIzOaAWXt73cNHmtEC8zSO2Y+kse/txmwIAJzkYZ5fooaS5DQ=="
},
"@types/parse-json": {
"version": "4.0.0",
@@ -797,45 +794,113 @@
"dev": true
},
"@typescript-eslint/eslint-plugin": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.19.0.tgz",
"integrity": "sha512-u7IcQ9qwsB6U806LupZmINRnQjC+RJyv36sV/ugaFWMHTbFm/hlLTRx3gGYJgHisxcGSTnf+I/fPDieRMhPSQQ==",
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.22.0.tgz",
"integrity": "sha512-BvxRLaTDVQ3N+Qq8BivLiE9akQLAOUfxNHIEhedOcg8B2+jY8Rc4/D+iVprvuMX1AdezFYautuGDwr9QxqSxBQ==",
"dev": true,
"requires": {
"@typescript-eslint/experimental-utils": "2.19.0",
"@typescript-eslint/experimental-utils": "2.22.0",
"eslint-utils": "^1.4.3",
"functional-red-black-tree": "^1.0.1",
"regexpp": "^3.0.0",
"tsutils": "^3.17.1"
},
"dependencies": {
"@typescript-eslint/experimental-utils": {
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.22.0.tgz",
"integrity": "sha512-sJt1GYBe6yC0dWOQzXlp+tiuGglNhJC9eXZeC8GBVH98Zv9jtatccuhz0OF5kC/DwChqsNfghHx7OlIDQjNYAQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.3",
"@typescript-eslint/typescript-estree": "2.22.0",
"eslint-scope": "^5.0.0"
}
},
"@typescript-eslint/typescript-estree": {
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.22.0.tgz",
"integrity": "sha512-2HFZW2FQc4MhIBB8WhDm9lVFaBDy6h9jGrJ4V2Uzxe/ON29HCHBTj3GkgcsgMWfsl2U5as+pTOr30Nibaw7qRQ==",
"dev": true,
"requires": {
"debug": "^4.1.1",
"eslint-visitor-keys": "^1.1.0",
"glob": "^7.1.6",
"is-glob": "^4.0.1",
"lodash": "^4.17.15",
"semver": "^6.3.0",
"tsutils": "^3.17.1"
}
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
}
}
},
"@typescript-eslint/experimental-utils": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz",
"integrity": "sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==",
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.22.0.tgz",
"integrity": "sha512-sJt1GYBe6yC0dWOQzXlp+tiuGglNhJC9eXZeC8GBVH98Zv9jtatccuhz0OF5kC/DwChqsNfghHx7OlIDQjNYAQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.3",
"@typescript-eslint/typescript-estree": "2.19.0",
"@typescript-eslint/typescript-estree": "2.22.0",
"eslint-scope": "^5.0.0"
}
},
"@typescript-eslint/parser": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.19.0.tgz",
"integrity": "sha512-s0jZoxAWjHnuidbbN7aA+BFVXn4TCcxEVGPV8lWMxZglSs3NRnFFAlL+aIENNmzB2/1jUJuySi6GiM6uACPmpg==",
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.22.0.tgz",
"integrity": "sha512-FaZKC1X+nvD7qMPqKFUYHz3H0TAioSVFGvG29f796Nc5tBluoqfHgLbSFKsh7mKjRoeTm8J9WX2Wo9EyZWjG7w==",
"dev": true,
"requires": {
"@types/eslint-visitor-keys": "^1.0.0",
"@typescript-eslint/experimental-utils": "2.19.0",
"@typescript-eslint/typescript-estree": "2.19.0",
"@typescript-eslint/experimental-utils": "2.22.0",
"@typescript-eslint/typescript-estree": "2.22.0",
"eslint-visitor-keys": "^1.1.0"
},
"dependencies": {
"@typescript-eslint/experimental-utils": {
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.22.0.tgz",
"integrity": "sha512-sJt1GYBe6yC0dWOQzXlp+tiuGglNhJC9eXZeC8GBVH98Zv9jtatccuhz0OF5kC/DwChqsNfghHx7OlIDQjNYAQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.3",
"@typescript-eslint/typescript-estree": "2.22.0",
"eslint-scope": "^5.0.0"
}
},
"@typescript-eslint/typescript-estree": {
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.22.0.tgz",
"integrity": "sha512-2HFZW2FQc4MhIBB8WhDm9lVFaBDy6h9jGrJ4V2Uzxe/ON29HCHBTj3GkgcsgMWfsl2U5as+pTOr30Nibaw7qRQ==",
"dev": true,
"requires": {
"debug": "^4.1.1",
"eslint-visitor-keys": "^1.1.0",
"glob": "^7.1.6",
"is-glob": "^4.0.1",
"lodash": "^4.17.15",
"semver": "^6.3.0",
"tsutils": "^3.17.1"
}
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
}
}
},
"@typescript-eslint/typescript-estree": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz",
"integrity": "sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==",
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.22.0.tgz",
"integrity": "sha512-2HFZW2FQc4MhIBB8WhDm9lVFaBDy6h9jGrJ4V2Uzxe/ON29HCHBTj3GkgcsgMWfsl2U5as+pTOr30Nibaw7qRQ==",
"dev": true,
"requires": {
"debug": "^4.1.1",
@@ -856,9 +921,9 @@
}
},
"@zeit/ncc": {
"version": "0.21.0",
"resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.21.0.tgz",
"integrity": "sha512-RUMdvVK/w78oo+yBjruZltt0kJXYar2un/1bYQ2LuHG7GmFVm+QjxzEmySwREctaJdEnBvlMdUNWd9hXHxEI3g==",
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.21.1.tgz",
"integrity": "sha512-M9WzgquSOt2nsjRkYM9LRylBLmmlwNCwYbm3Up3PDEshfvdmIfqpFNSK8EJvR18NwZjGHE5z2avlDtYQx2JQnw==",
"dev": true
},
"JSONStream": {
@@ -1136,7 +1201,8 @@
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"base": {
"version": "0.11.2",
@@ -1217,6 +1283,7 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -1578,7 +1645,8 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"concat-stream": {
"version": "2.0.0",
@@ -2323,13 +2391,12 @@
}
},
"eslint-plugin-jest": {
"version": "23.6.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.6.0.tgz",
"integrity": "sha512-GH8AhcFXspOLqak7fqnddLXEJsrFyvgO8Bm60SexvKSn1+3rWYESnCiWUOCUcBTprNSDSE4CtAZdM4EyV6gPPw==",
"version": "23.8.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.8.2.tgz",
"integrity": "sha512-xwbnvOsotSV27MtAe7s8uGWOori0nUsrXh2f1EnpmXua8sDfY6VZhHAhHg2sqK7HBNycRQExF074XSZ7DvfoFg==",
"dev": true,
"requires": {
"@typescript-eslint/experimental-utils": "^2.5.0",
"micromatch": "^4.0.2"
"@typescript-eslint/experimental-utils": "^2.5.0"
}
},
"eslint-scope": {
@@ -3365,9 +3432,9 @@
"dev": true
},
"husky": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/husky/-/husky-4.2.1.tgz",
"integrity": "sha512-Qa0lRreeIf4Tl92sSs42ER6qc3hzoyQPPorzOrFWfPEVbdi6LuvJEqWKPk905fOWIR76iBpp7ECZNIwk+a8xuQ==",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/husky/-/husky-4.2.3.tgz",
"integrity": "sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ==",
"dev": true,
"requires": {
"chalk": "^3.0.0",
@@ -4537,9 +4604,9 @@
"dev": true
},
"lint-staged": {
"version": "10.0.7",
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.0.7.tgz",
"integrity": "sha512-Byj0F4l7GYUpYYHEqyFH69NiI6ICTg0CeCKbhRorL+ickbzILKUlZLiyCkljZV02wnoh7yH7PmFyYm9PRNwk9g==",
"version": "10.0.8",
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.0.8.tgz",
"integrity": "sha512-Oa9eS4DJqvQMVdywXfEor6F4vP+21fPHF8LUXgBbVWUSWBddjqsvO6Bv1LwMChmgQZZqwUvgJSHlu8HFHAPZmA==",
"dev": true,
"requires": {
"chalk": "^3.0.0",
@@ -5155,9 +5222,9 @@
}
},
"make-error": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
"integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==",
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true
},
"makeerror": {
@@ -5265,6 +5332,7 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -7356,9 +7424,9 @@
"dev": true
},
"ts-jest": {
"version": "25.2.0",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-25.2.0.tgz",
"integrity": "sha512-VaRdb0da46eorLfuHEFf0G3d+jeREcV+Wb/SvW71S4y9Oe8SHWU+m1WY/3RaMknrBsnvmVH0/rRjT8dkgeffNQ==",
"version": "25.2.1",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-25.2.1.tgz",
"integrity": "sha512-TnntkEEjuXq/Gxpw7xToarmHbAafgCaAzOpnajnFC6jI7oo1trMzAHA04eWpc3MhV6+yvhE8uUBAmN+teRJh0A==",
"dev": true,
"requires": {
"bs-logger": "0.x",
@@ -7370,24 +7438,7 @@
"mkdirp": "0.x",
"resolve": "1.x",
"semver": "^5.5",
"yargs-parser": "10.x"
},
"dependencies": {
"camelcase": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
"dev": true
},
"yargs-parser": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
"integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
"dev": true,
"requires": {
"camelcase": "^4.1.0"
}
}
"yargs-parser": "^16.1.0"
}
},
"tslib": {
@@ -7462,9 +7513,9 @@
}
},
"typescript": {
"version": "3.7.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz",
"integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==",
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz",
"integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==",
"dev": true
},
"uglify-js": {

View File

@@ -1,11 +1,11 @@
{
"name": "actions-github-pages",
"version": "3.0.0-1",
"version": "3.5.1",
"description": "GitHub Actions for GitHub Pages",
"main": "lib/index.js",
"engines": {
"node": ">=12.14.1",
"npm": ">=6.13.7"
"node": ">=12.16.1",
"npm": ">=6.14.2"
},
"scripts": {
"lint": "eslint ./{src,__tests__}/**/*.ts",
@@ -50,27 +50,28 @@
},
"homepage": "https://github.com/peaceiris/actions-gh-pages#readme",
"dependencies": {
"@actions/core": "^1.2.2",
"@actions/core": "^1.2.3",
"@actions/exec": "^1.0.3",
"@actions/github": "^2.1.0",
"@actions/glob": "^0.1.0",
"@actions/github": "^2.1.1",
"@actions/io": "^1.0.2"
},
"devDependencies": {
"@types/jest": "^25.1.1",
"@types/node": "^13.7.0",
"@typescript-eslint/eslint-plugin": "^2.19.0",
"@typescript-eslint/parser": "^2.19.0",
"@zeit/ncc": "^0.21.0",
"@types/jest": "^25.1.4",
"@types/js-yaml": "^3.12.2",
"@types/node": "~12",
"@typescript-eslint/eslint-plugin": "^2.22.0",
"@typescript-eslint/parser": "^2.22.0",
"@zeit/ncc": "^0.21.1",
"eslint": "^6.8.0",
"eslint-plugin-jest": "^23.6.0",
"husky": "^4.2.1",
"eslint-plugin-jest": "^23.8.2",
"husky": "^4.2.3",
"jest": "^25.1.0",
"jest-circus": "^25.1.0",
"lint-staged": "^10.0.7",
"js-yaml": "^3.13.1",
"lint-staged": "^10.0.8",
"prettier": "1.19.1",
"standard-version": "^7.1.0",
"ts-jest": "^25.2.0",
"typescript": "^3.7.5"
"ts-jest": "^25.2.1",
"typescript": "^3.8.3"
}
}

View File

@@ -3,12 +3,23 @@
# fail on unset variables and command errors
set -eu -o pipefail # -x: is for debugging
if [ "$(git branch --show-current)" != "master" ]; then
echo "$0: Current branch is not master" 1>&2
exit 1
CURRENT_BRANCH="$(git branch --show-current)"
if [ "${CURRENT_BRANCH}" != "master" ]; then
echo "$0: Current branch ${CURRENT_BRANCH} is not master, continue? (y/n)"
read -r res
if [ "${res}" = "n" ]; then
echo "$0: Stop script"
exit 0
fi
fi
PRERELEASE_TYPE_LIST="prerelease prepatch preminor premajor"
if [ "${CURRENT_BRANCH}" != "master" ]; then
RELEASE_TYPE_LIST="${PRERELEASE_TYPE_LIST}"
else
RELEASE_TYPE_LIST="${PRERELEASE_TYPE_LIST} patch minor major"
fi
RELEASE_TYPE_LIST="prerelease prepatch patch preminor minor major premajor"
if command -v fzf; then
RELEASE_TYPE=$(echo "${RELEASE_TYPE_LIST}" | tr ' ' '\n' | fzf --layout=reverse)
else
@@ -26,9 +37,13 @@ if [ "${res}" = "n" ]; then
fi
git fetch origin
git pull origin master
git tag -d v3 || true
git pull origin --tags
if [ "${CURRENT_BRANCH}" != "master" ]; then
git pull origin "${CURRENT_BRANCH}"
else
git pull origin master
git tag -d v3 || true
git pull origin --tags
fi
npm ci
@@ -43,6 +58,11 @@ git rm ./lib/index.js
rm -rf ./lib
git commit -m "chore(release): Remove build assets [skip ci]"
if [ "${CURRENT_BRANCH}" != "master" ]; then
git push origin "${CURRENT_BRANCH}"
else
git push origin master
fi
TAG_NAME="v$(jq -r '.version' ./package.json)"
git push origin master
git push origin "${TAG_NAME}"

View File

@@ -1,29 +1,50 @@
import * as core from '@actions/core';
import {Inputs} from './interfaces';
function showInputs(inps: Inputs): void {
export function showInputs(inps: Inputs): void {
let authMethod = '';
if (inps.DeployKey) {
core.info(`[INFO] DeployKey: true`);
authMethod = 'DeployKey';
} else if (inps.GithubToken) {
core.info(`[INFO] GithubToken: true`);
authMethod = 'GithubToken';
} else if (inps.PersonalToken) {
core.info(`[INFO] PersonalToken: true`);
authMethod = 'PersonalToken';
}
core.info(`[INFO] PublishBranch: ${inps.PublishBranch}`);
core.info(`[INFO] PublishDir: ${inps.PublishDir}`);
core.info(`[INFO] ExternalRepository: ${inps.ExternalRepository}`);
core.info(`[INFO] AllowEmptyCommit: ${inps.AllowEmptyCommit}`);
core.info(`[INFO] KeepFiles: ${inps.KeepFiles}`);
core.info(`[INFO] ForceOrphan: ${inps.ForceOrphan}`);
core.info(`[INFO] UserEmail: ${inps.UserEmail}`);
core.info(`[INFO] UserEmail: ${inps.UserEmail}`);
core.info(`[INFO] CommitMessage: ${inps.CommitMessage}`);
core.info(`[INFO] TagName: ${inps.TagName}`);
core.info(`[INFO] TagMessage: ${inps.TagMessage}`);
core.info(`\
[INFO] ${authMethod}: true
[INFO] PublishBranch: ${inps.PublishBranch}
[INFO] PublishDir: ${inps.PublishDir}
[INFO] ExternalRepository: ${inps.ExternalRepository}
[INFO] AllowEmptyCommit: ${inps.AllowEmptyCommit}
[INFO] KeepFiles: ${inps.KeepFiles}
[INFO] ForceOrphan: ${inps.ForceOrphan}
[INFO] UserName: ${inps.UserName}
[INFO] UserEmail: ${inps.UserEmail}
[INFO] CommitMessage: ${inps.CommitMessage}
[INFO] TagName: ${inps.TagName}
[INFO] TagMessage: ${inps.TagMessage}
[INFO] EnableJekyll (DisableNoJekyll): ${inps.DisableNoJekyll}
[INFO] CNAME: ${inps.CNAME}
`);
}
export function getInputs(): Inputs {
let useBuiltinJekyll = false;
const enableJekyll: boolean =
(core.getInput('enable_jekyll') || 'false').toUpperCase() === 'TRUE';
const disableNoJekyll: boolean =
(core.getInput('disable_nojekyll') || 'false').toUpperCase() === 'TRUE';
if (enableJekyll && disableNoJekyll) {
throw new Error(`Use either of enable_jekyll or disable_nojekyll`);
} else if (enableJekyll) {
useBuiltinJekyll = true;
} else if (disableNoJekyll) {
useBuiltinJekyll = true;
}
const inps: Inputs = {
DeployKey: core.getInput('deploy_key'),
GithubToken: core.getInput('github_token'),
@@ -41,10 +62,10 @@ export function getInputs(): Inputs {
UserEmail: core.getInput('user_email'),
CommitMessage: core.getInput('commit_message'),
TagName: core.getInput('tag_name'),
TagMessage: core.getInput('tag_message')
TagMessage: core.getInput('tag_message'),
DisableNoJekyll: useBuiltinJekyll,
CNAME: core.getInput('cname')
};
showInputs(inps);
return inps;
}

View File

@@ -2,16 +2,10 @@ import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as github from '@actions/github';
import * as io from '@actions/io';
import * as glob from '@actions/glob';
import path from 'path';
import fs from 'fs';
import {Inputs, CmdResult} from './interfaces';
import {getHomeDir} from './utils';
export async function createWorkDir(workDirName: string): Promise<void> {
await io.mkdirP(workDirName);
core.debug(`workDir was created: ${workDirName}`);
return;
}
import {createWorkDir} from './utils';
export async function createBranchForce(branch: string): Promise<void> {
await exec.exec('git', ['init']);
@@ -23,21 +17,26 @@ export async function copyAssets(
publishDir: string,
workDir: string
): Promise<void> {
const copyOpts = {recursive: true, force: false};
const globber = await glob.create(`${publishDir}/*`);
for await (const file of globber.globGenerator()) {
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;
}
await io.cp(file, `${workDir}/`, copyOpts);
const filePath = path.join(publishDir, file);
await io.cp(filePath, `${workDir}/`, copyOpts);
core.info(`[INFO] copy ${file}`);
}
return;
}
export async function setRepo(inps: Inputs, remoteURL: string): Promise<void> {
const workDir = path.join(getHomeDir(), 'actions_github_pages');
export async function setRepo(
inps: Inputs,
remoteURL: string,
workDir: string
): Promise<void> {
const publishDir = path.join(
`${process.env.GITHUB_WORKSPACE}`,
inps.PublishDir
@@ -63,36 +62,41 @@ export async function setRepo(inps: Inputs, remoteURL: string): Promise<void> {
}
}
};
result.exitcode = await exec.exec(
'git',
[
'clone',
'--depth=1',
'--single-branch',
'--branch',
inps.PublishBranch,
remoteURL,
workDir
],
options
);
process.chdir(workDir);
try {
result.exitcode = await exec.exec(
'git',
[
'clone',
'--depth=1',
'--single-branch',
'--branch',
inps.PublishBranch,
remoteURL,
workDir
],
options
);
if (result.exitcode === 0) {
process.chdir(workDir);
if (inps.KeepFiles) {
core.info('[INFO] Keep existing files');
} else {
await exec.exec('git', ['rm', '-r', '--ignore-unmatch', '*']);
}
if (result.exitcode === 0) {
if (inps.KeepFiles) {
core.info('[INFO] Keep existing files');
await copyAssets(publishDir, workDir);
return;
} else {
await exec.exec('git', ['rm', '-r', '--ignore-unmatch', '*']);
throw new Error(`Failed to clone remote branch ${inps.PublishBranch}`);
}
await copyAssets(publishDir, workDir);
return;
} else {
} catch (e) {
core.info(
`[INFO] first deployment, create new branch ${inps.PublishBranch}`
);
core.info(e.message);
await createWorkDir(workDir);
process.chdir(workDir);
await createBranchForce(inps.PublishBranch);
await copyAssets(publishDir, workDir);
return;
@@ -152,7 +156,7 @@ export async function commit(
}
} catch (e) {
core.info('[INFO] skip commit');
core.debug(`[INFO] skip commit ${e}`);
core.debug(`[INFO] skip commit ${e.message}`);
}
}

View File

@@ -5,6 +5,6 @@ import * as main from './main';
try {
await main.run();
} catch (e) {
core.setFailed(`Action failed with "${e}"`);
core.setFailed(`Action failed with "${e.message}"`);
}
})();

View File

@@ -13,6 +13,8 @@ export interface Inputs {
readonly CommitMessage: string;
readonly TagName: string;
readonly TagMessage: string;
readonly DisableNoJekyll: boolean;
readonly CNAME: string;
}
export interface CmdResult {

View File

@@ -1,25 +1,33 @@
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import {Inputs} from './interfaces';
import {getInputs} from './get-inputs';
import {showInputs, getInputs} from './get-inputs';
import {setTokens} from './set-tokens';
import * as git from './git-utils';
import {getWorkDirName, addNoJekyll, addCNAME} from './utils';
export async function run(): Promise<void> {
try {
const inps: Inputs = getInputs();
showInputs(inps);
await git.setConfig(inps.UserName, inps.UserEmail);
const remoteURL = await setTokens(inps);
core.info(`[INFO] remoteURL: ${remoteURL}`); // TODO: remove
core.debug(`[INFO] remoteURL: ${remoteURL}`);
await git.setRepo(inps, remoteURL);
const date = new Date();
const unixTime = date.getTime();
const workDir = await getWorkDirName(`${unixTime}`);
await git.setRepo(inps, remoteURL, workDir);
await addNoJekyll(workDir, inps.DisableNoJekyll, inps.PublishBranch);
await addCNAME(workDir, inps.CNAME);
try {
await exec.exec('git', ['remote', 'rm', 'origin']);
} catch (e) {
core.info(`[INFO] e`);
core.info(`[INFO] ${e.message}`);
}
await exec.exec('git', ['remote', 'add', 'origin', remoteURL]);
await exec.exec('git', ['add', '--all']);
@@ -31,10 +39,11 @@ export async function run(): Promise<void> {
);
await git.push(inps.PublishBranch, inps.ForceOrphan);
await git.pushTag(inps.TagName, inps.TagMessage);
core.info('[INFO] successfully deployed');
core.info('[INFO] Action successfully completed');
return;
} catch (e) {
throw new Error(e);
throw new Error(e.message);
}
}

View File

@@ -4,15 +4,10 @@ import * as github from '@actions/github';
import * as io from '@actions/io';
import path from 'path';
import fs from 'fs';
const cpSpawnSync = require('child_process').spawnSync;
const cpexec = require('child_process').execFileSync;
import {Inputs} from './interfaces';
export function setPublishRepo(insp: Inputs): string {
if (insp.ExternalRepository) {
return insp.ExternalRepository;
}
return `${github.context.repo.owner}/${github.context.repo.repo}`;
}
import {getHomeDir} from './utils';
export async function setSSHKey(
inps: Inputs,
@@ -20,7 +15,8 @@ export async function setSSHKey(
): Promise<string> {
core.info('[INFO] setup SSH deploy key');
const sshDir = path.join(`${process.env.HOME}`, '.ssh');
const homeDir = await getHomeDir();
const sshDir = path.join(homeDir, '.ssh');
await io.mkdirP(sshDir);
await exec.exec('chmod', ['700', sshDir]);
@@ -50,6 +46,12 @@ Host github
core.info(`[INFO] wrote ${sshConfigPath}`);
await exec.exec('chmod', ['600', sshConfigPath]);
if (process.platform === 'win32') {
await cpSpawnSync('Start-Process', ['powershell.exe', '-Verb', 'runas']);
await cpSpawnSync('sh', ['-c', '\'eval "$(ssh-agent)"\''], {shell: true});
await exec.exec('sc', ['config', 'ssh-agent', 'start=auto']);
await exec.exec('sc', ['start', 'ssh-agent']);
}
await cpexec('ssh-agent', ['-a', '/tmp/ssh-auth.sock']);
core.exportVariable('SSH_AUTH_SOCK', '/tmp/ssh-auth.sock');
await exec.exec('ssh-add', [idRSA]);
@@ -57,68 +59,82 @@ Host github
return `git@github.com:${publishRepo}.git`;
}
export async function setGithubToken(
inps: Inputs,
publishRepo: string
): Promise<string> {
export function setGithubToken(
githubToken: string,
publishRepo: string,
publishBranch: string,
externalRepository: string,
ref: string,
eventName: string
): string {
core.info('[INFO] setup GITHUB_TOKEN');
const context = github.context;
const payload = github.context.payload;
core.debug(`ref: ${context.ref}`);
core.debug(`eventName: ${context.eventName}`);
core.debug(`private: ${payload.repository?.private}`);
core.debug(`ref: ${ref}`);
core.debug(`eventName: ${eventName}`);
let isProhibitedBranch = false;
const ref = context.ref;
if (context.eventName === 'push') {
isProhibitedBranch = ref.includes(`refs/heads/${inps.PublishBranch}`);
if (eventName === 'push') {
isProhibitedBranch = ref.includes(`refs/heads/${publishBranch}`);
if (isProhibitedBranch) {
throw new Error(
`You deploy from ${inps.PublishBranch} to ${inps.PublishBranch}`
);
throw new Error(`You deploy from ${publishBranch} to ${publishBranch}`);
}
} else if (context.eventName === 'pull_request') {
// TODO: support pull_request event
throw new Error('This action does not support pull_request event now.');
}
const isPrivateRepository = payload.repository?.private;
if (inps.ExternalRepository) {
if (externalRepository) {
throw new Error(
'GITHUB_TOKEN does not support to push to an external repository'
);
}
if (isPrivateRepository === false) {
core.warning(
'GITHUB_TOKEN does not support to trigger the GitHub Pages build event on a public repository'
);
}
return `https://x-access-token:${inps.GithubToken}@github.com/${publishRepo}.git`;
return `https://x-access-token:${githubToken}@github.com/${publishRepo}.git`;
}
export async function setPersonalToken(
inps: Inputs,
export function setPersonalToken(
personalToken: string,
publishRepo: string
): Promise<string> {
): string {
core.info('[INFO] setup personal access token');
return `https://x-access-token:${inps.PersonalToken}@github.com/${publishRepo}.git`;
return `https://x-access-token:${personalToken}@github.com/${publishRepo}.git`;
}
export function getPublishRepo(
externalRepository: string,
owner: string,
repo: string
): string {
if (externalRepository) {
return externalRepository;
}
return `${owner}/${repo}`;
}
export async function setTokens(inps: Inputs): Promise<string> {
try {
const publishRepo = setPublishRepo(inps);
const publishRepo = getPublishRepo(
inps.ExternalRepository,
github.context.repo.owner,
github.context.repo.repo
);
if (inps.DeployKey) {
return setSSHKey(inps, publishRepo);
} else if (inps.GithubToken) {
return setGithubToken(inps, publishRepo);
const context = github.context;
const ref = context.ref;
const eventName = context.eventName;
return setGithubToken(
inps.GithubToken,
publishRepo,
inps.PublishBranch,
inps.ExternalRepository,
ref,
eventName
);
} else if (inps.PersonalToken) {
return setPersonalToken(inps, publishRepo);
return setPersonalToken(inps.PersonalToken, publishRepo);
} else {
throw new Error('not found deploy key or tokens');
}
} catch (e) {
throw new Error(e);
throw new Error(e.message);
}
}

View File

@@ -1,6 +1,9 @@
import * as core from '@actions/core';
import * as io from '@actions/io';
import path from 'path';
import fs from 'fs';
export function getHomeDir(): string {
export async function getHomeDir(): Promise<string> {
let homedir = '';
if (process.platform === 'win32') {
@@ -13,3 +16,49 @@ export function getHomeDir(): string {
return homedir;
}
export async function getWorkDirName(unixTime: string): Promise<string> {
const homeDir = await getHomeDir();
const workDirName = path.join(homeDir, `actions_github_pages_${unixTime}`);
return workDirName;
}
export async function createWorkDir(workDirName: string): Promise<void> {
await io.mkdirP(workDirName);
core.debug(`Created: ${workDirName}`);
return;
}
export async function addNoJekyll(
workDir: string,
DisableNoJekyll: boolean,
PublishBranch: string
): Promise<void> {
if (DisableNoJekyll) {
return;
}
if (PublishBranch === 'master' || PublishBranch === 'gh-pages') {
const filepath = path.join(workDir, '.nojekyll');
if (fs.existsSync(filepath)) {
return;
}
fs.closeSync(fs.openSync(filepath, 'w'));
core.info(`[INFO] Created ${filepath}`);
}
}
export async function addCNAME(
workDir: string,
content: string
): Promise<void> {
if (content === '') {
return;
}
const filepath = path.join(workDir, 'CNAME');
if (fs.existsSync(filepath)) {
core.warning(`CNAME already exists, skip adding CNAME`);
return;
}
fs.writeFileSync(filepath, content + '\n');
core.info(`[INFO] Created ${filepath}`);
}