Compare commits

...

244 Commits

Author SHA1 Message Date
peaceiris
8457ade3d7 chore(release): 3.6.1
Some checks failed
Release / release (push) Has been cancelled
2020-05-04 10:29:34 +09:00
peaceiris
bdb15640ef chore(release): Add build assets 2020-05-04 10:29:33 +09:00
peaceiris
f559ed8889 docs: Add example image for commit_message 2020-05-04 10:27:29 +09:00
Shohei Ueda
db3e60d230 feat: Fold logs using core.startGroup() (#277)
cf. https://github.com/actions/toolkit/blob/master/docs/commands.md
2020-05-04 10:23:22 +09:00
Shohei Ueda
504181401b test: Add test case for getCommitMessage() (#276) 2020-05-04 10:06:41 +09:00
peaceiris
b0da6c009f chore(release): Remove build assets [skip ci] 2020-05-04 09:51:28 +09:00
peaceiris
c56c9818a0 chore(release): 3.6.0
Some checks failed
Release / release (push) Has been cancelled
2020-05-04 09:51:27 +09:00
peaceiris
1c794ced3b chore(release): Add build assets 2020-05-04 09:51:26 +09:00
Shohei Ueda
0b7411e2cf feat: Add full_commit_message (#275)
* feat: Add full_commit_message
* ci: Add full_commit_message
* docs: Add full_commit_message

cf. #274
2020-05-04 09:50:38 +09:00
peaceiris
750c807fa1 chore: Enhance style 2020-05-04 00:52:58 +09:00
dependabot-preview[bot]
ae34186caa deps: bump jest from 25.5.3 to 25.5.4 (#272) 2020-05-02 08:30:17 +00:00
dependabot-preview[bot]
a5d411bf28 deps: bump jest-circus from 25.5.3 to 25.5.4 (#271) 2020-05-02 08:23:58 +00:00
peaceiris
2875e4112a Revert "ci: use github_token"
This reverts commit 9d27fac8dc.
2020-05-02 02:25:23 +09:00
Shohei Ueda
9d27fac8dc ci: use github_token 2020-05-02 02:21:22 +09:00
Shohei Ueda
7501463241 ci: Add test-ubuntu-20.04 job (#270)
- Bumps mdBook from 0.3.6 to 0.3.7
- Add test job for ubuntu 20.04

cf. #268
2020-05-01 15:10:19 +09:00
dependabot-preview[bot]
b9cccec41e deps: bump lint-staged from 10.2.1 to 10.2.2 (#269) 2020-05-01 04:44:42 +00:00
dependabot-preview[bot]
e782e1d323 deps: bump jest from 25.5.2 to 25.5.3 (#267) 2020-04-30 22:48:48 +00:00
dependabot-preview[bot]
c12a4b1908 deps: bump jest-circus from 25.5.2 to 25.5.3 (#266) 2020-04-30 22:28:14 +00:00
dependabot-preview[bot]
dd1933a7b4 deps: bump @actions/core from 1.2.3 to 1.2.4 (#265) 2020-04-30 17:21:50 +00:00
dependabot-preview[bot]
08093066ac deps: bump lint-staged from 10.2.0 to 10.2.1 (#264) 2020-04-30 15:00:06 +00:00
peaceiris
c603e10bc1 chore(release): Remove build assets [skip ci] 2020-04-30 23:49:32 +09:00
peaceiris
5fe58fddba chore(release): 3.5.10
Some checks failed
Release / release (push) Has been cancelled
2020-04-30 23:49:31 +09:00
peaceiris
54a4434749 chore(release): Add build assets 2020-04-30 23:49:28 +09:00
Shohei Ueda
20d80bcd8c docs: change to job level defaults
Change workflow level defaults.run.working-directory to job level in Docusaurus example.
2020-04-30 23:48:01 +09:00
Shohei Ueda
d9f616f4a2 docs: Add ubuntu-16.04
cf. #263
2020-04-30 23:42:27 +09:00
Shohei Ueda
e76c874d85 feat: Support ubuntu-16.04 (#263)
* ci: Add ubuntu-16.04
* ci: bump actions/upload-artifact from v1 to v2
* ci: Fix file name for all matrix
2020-04-30 23:36:53 +09:00
Shohei Ueda
029c1a08f9 docs: bump actions/setup-python from v1 to v2 (#262)
https://github.com/actions/setup-python/pull/87
https://github.com/actions/setup-python/pull/85

Testing https://github.com/peaceiris/mkdocs-material-boilerplate/pull/102
2020-04-30 23:13:03 +09:00
Shohei Ueda
eafac7a3ef docs: bump python from 3.6 to 3.8 2020-04-30 17:04:31 +09:00
Shohei Ueda
e4462d9bb6 docs: Enhance Python workflow example (#261)
4e1362e350

ccf9619480
https://github.com/actions/cache/pull/285
2020-04-30 17:03:08 +09:00
Shohei Ueda
91e6658ef0 docs: Enhance Supported Platforms 2020-04-30 16:38:29 +09:00
dependabot-preview[bot]
714f710922 deps: bump jest from 25.5.1 to 25.5.2 (#260) 2020-04-29 22:30:52 +00:00
dependabot-preview[bot]
813be0645e deps: bump jest-circus from 25.5.1 to 25.5.2 (#259) 2020-04-29 22:24:44 +00:00
peaceiris
a580dd75ed chore(release): Remove build assets [skip ci] 2020-04-30 03:07:46 +09:00
peaceiris
cf30185743 chore(release): 3.5.9
Some checks failed
Release / release (push) Has been cancelled
2020-04-30 03:07:45 +09:00
peaceiris
f815420c17 chore(release): Add build assets 2020-04-30 03:07:44 +09:00
peaceiris
e5aa21b8a8 chore: bump node from 12.16.2 to 12.16.3 2020-04-30 03:07:14 +09:00
dependabot-preview[bot]
d2178821cb deps: [security] bump @actions/http-client from 1.0.6 to 1.0.8 (#258) 2020-04-29 18:04:52 +00:00
dependabot-preview[bot]
6462e1bf5e deps: bump jest from 25.5.0 to 25.5.1 (#257) 2020-04-29 13:53:47 +00:00
dependabot-preview[bot]
051ddfc79a deps: bump jest-circus from 25.5.0 to 25.5.1 (#256) 2020-04-29 13:16:23 +00:00
Shohei Ueda
f191fb8187 deps: bump node from 12.16.2 to 12.16.3 (#255) 2020-04-29 15:34:00 +09:00
dependabot-preview[bot]
6cb5962c01 deps: bump @actions/exec from 1.0.3 to 1.0.4 (#254) 2020-04-29 05:23:43 +00:00
dependabot-preview[bot]
33b82d2be0 deps: bump prettier from 2.0.4 to 2.0.5 (#253) 2020-04-29 05:16:42 +00:00
peaceiris
a2c82a8833 chore(release): Remove build assets [skip ci] 2020-04-29 13:53:02 +09:00
peaceiris
286809f3da chore(release): 3.5.8
Some checks failed
Release / release (push) Has been cancelled
2020-04-29 13:53:01 +09:00
peaceiris
5e3936a404 chore(release): Add build assets 2020-04-29 13:53:00 +09:00
dependabot-preview[bot]
f97b3d256e deps: bump @typescript-eslint/eslint-plugin from 2.28.0 to 2.30.0 (#252) 2020-04-29 04:15:11 +00:00
dependabot-preview[bot]
7b01d765e7 deps: bump @types/node from 12.12.36 to 12.12.37 (#251) 2020-04-29 04:03:20 +00:00
dependabot-preview[bot]
4976317340 deps: bump lint-staged from 10.1.6 to 10.2.0 (#250) 2020-04-29 03:50:29 +00:00
dependabot-preview[bot]
28e7732e93 deps: bump @typescript-eslint/parser from 2.28.0 to 2.30.0 (#249) 2020-04-29 02:21:55 +00:00
dependabot-preview[bot]
390b063535 deps: bump jest from 25.3.0 to 25.5.0 (#248) 2020-04-28 20:25:54 +00:00
dependabot-preview[bot]
50bcf7b81d deps: bump jest-circus from 25.3.0 to 25.5.0 (#247) 2020-04-28 20:04:15 +00:00
Shohei Ueda
1511f85feb docs: Enhance the Tips and FAQ section
- Enhance `First Deployment with GITHUB_TOKEN`
2020-04-28 14:25:48 +09:00
Shohei Ueda
db7681db4d deps: bump git from 2.26.1 to 2.26.2 (#246) 2020-04-25 23:06:07 +09:00
peaceiris
eda4527add chore: Add issue priority [skip ci] 2020-04-23 12:55:35 +09:00
peaceiris
0ab035e1c1 Revert "chore: Add issue priority [skip ci]"
This reverts commit af61d81606.
2020-04-23 12:53:19 +09:00
Shohei Ueda
af61d81606 chore: Add issue priority [skip ci] 2020-04-23 12:52:32 +09:00
Shohei Ueda
86114bb2c7 chore: update [skip ci] 2020-04-23 12:44:24 +09:00
Shohei Ueda
1139364d4c chore: enhance about [skip ci] 2020-04-23 12:43:08 +09:00
Shohei Ueda
e3404eb04b ci: Add hook for doctoc (#244) 2020-04-22 13:33:06 +09:00
dependabot-preview[bot]
c1bc06c3e6 deps: bump lint-staged from 10.1.5 to 10.1.6 (#241) 2020-04-19 09:43:53 +00:00
peaceiris
8632feabc7 docs: update 2020-04-19 14:14:03 +09:00
peaceiris
7d421d3e4c docs: update 2020-04-19 14:11:37 +09:00
peaceiris
95d87cfaa5 docs: update 2020-04-19 11:44:23 +09:00
dependabot-preview[bot]
cfc119fff7 deps: bump lint-staged from 10.1.4 to 10.1.5 (#240) 2020-04-18 08:29:08 +00:00
Shohei Ueda
4b0ac9453b docs: Add publish_branch and publish_dir (#239) 2020-04-18 14:30:22 +09:00
dependabot-preview[bot]
b7c9581509 deps: bump @types/node from 12.12.35 to 12.12.36 (#238) 2020-04-17 21:45:30 +00:00
dependabot-preview[bot]
fd97637134 deps: bump lint-staged from 10.1.3 to 10.1.4 (#237) 2020-04-17 14:48:13 +00:00
dependabot-preview[bot]
f69bcb9ae8 deps: bump ts-jest from 25.3.1 to 25.4.0 (#236) 2020-04-17 10:14:29 +00:00
Shohei Ueda
f1ebad9abb docs: Enhance cache key (#235) 2020-04-17 09:53:26 +09:00
Shohei Ueda
63cdebd96b docs: Enhance Docusaurus example workflow (#234)
- Add on.push.paths
- Add defaults.run.working-directory
  - https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun
  - https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/
2020-04-17 09:27:11 +09:00
peaceiris
4f693f0ddb chore(release): Remove build assets [skip ci] 2020-04-15 10:55:53 +09:00
peaceiris
1828d864ae chore(release): 3.5.7
Some checks failed
Release / release (push) Has been cancelled
2020-04-15 10:55:53 +09:00
peaceiris
dbc1ba3666 chore(release): Add build assets 2020-04-15 10:55:51 +09:00
Shohei Ueda
df5698c4aa deps: bump git from 2.26.0 to 2.26.1 (#233) 2020-04-15 10:50:03 +09:00
Shohei Ueda
9614091a5e docs: update 2020-04-15 09:25:23 +09:00
Shohei Ueda
98e0f6025c ci: delete stale workflow 2020-04-14 10:51:25 +09:00
Shohei Ueda
8dd38bec4d chore: bump node and npm (#232) 2020-04-14 10:31:15 +09:00
dependabot-preview[bot]
ddf2c5b9f1 deps: bump @typescript-eslint/eslint-plugin from 2.27.0 to 2.28.0 (#231) 2020-04-13 17:31:43 +00:00
dependabot-preview[bot]
d8356e3cf1 deps: bump @typescript-eslint/parser from 2.27.0 to 2.28.0 (#230) 2020-04-13 17:26:19 +00:00
Pierre Mavro
fb15409be9 docs: Update Docusaurus workflow example (#229)
* Updating Docusaurus config to make it work
* docs: Fix publish_dir

There were some issues, it was impossible to get it working just with a simple copy/paste

* Test repo: https://github.com/peaceiris/test-docusaurus
* Reference: https://docusaurus.io/docs/en/installation

Co-authored-by: peaceiris <30958501+peaceiris@users.noreply.github.com>
2020-04-13 23:27:34 +09:00
Shohei Ueda
9f90987bad docs: Add Swift Publish example (#228)
https://github.com/JohnSundell/Publish

Close #227
2020-04-11 23:58:23 +09:00
Shohei Ueda
596c2d5548 docs: Add branches 2020-04-11 23:53:15 +09:00
peaceiris
b6bc5040aa docs: bump hugo and mdbook 2020-04-11 02:59:20 +09:00
Shohei Ueda
6fcf128c18 deps: bump node 12.16.1 to 12.16.2 (#223) 2020-04-10 09:33:36 +09:00
dependabot-preview[bot]
bf8dc2ce19 deps: bump husky from 4.2.4 to 4.2.5 (#226) 2020-04-09 21:45:48 +00:00
dependabot-preview[bot]
abd7ea550b deps: bump husky from 4.2.3 to 4.2.4 (#225) 2020-04-09 16:54:41 +00:00
dependabot-preview[bot]
ab7b255432 deps: bump lint-staged from 10.1.2 to 10.1.3 (#224) 2020-04-09 15:25:09 +00:00
dependabot-preview[bot]
8af9b8c0d5 deps: bump @types/node from 12.12.34 to 12.12.35 (#222) 2020-04-08 19:15:53 +00:00
dependabot-preview[bot]
a07d7115c5 deps: bump jest from 25.2.7 to 25.3.0 (#221) 2020-04-08 15:26:31 +00:00
dependabot-preview[bot]
20e19cf1eb deps: bump jest-circus from 25.2.7 to 25.3.0 (#220) 2020-04-08 15:18:29 +00:00
dependabot-preview[bot]
da14e08646 deps: bump @typescript-eslint/parser from 2.26.0 to 2.27.0 (#218) 2020-04-07 02:30:05 +00:00
dependabot-preview[bot]
046c703d6d deps: bump @typescript-eslint/eslint-plugin from 2.26.0 to 2.27.0 (#219) 2020-04-07 02:25:48 +00:00
dependabot-preview[bot]
ab371259dd deps: bump prettier from 2.0.2 to 2.0.4 (#217) 2020-04-07 02:25:11 +00:00
dependabot-preview[bot]
711b0ed1cd deps: bump @zeit/ncc from 0.22.0 to 0.22.1 (#215)
Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/zeit/ncc/releases)
- [Commits](https://github.com/zeit/ncc/compare/0.22.0...0.22.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-07 11:19:17 +09:00
dependabot-preview[bot]
e5063fa6dd deps: bump lint-staged from 10.1.1 to 10.1.2 (#214)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.1.1 to 10.1.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.1.1...v10.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-07 11:18:55 +09:00
peaceiris
58be994809 deps: npm audit fix 2020-04-04 18:52:25 +09:00
peaceiris
6d889ad7e9 ci: Add automerged_updates 2020-04-04 18:51:12 +09:00
dependabot-preview[bot]
37ce049d08 deps: bump @types/jest from 25.1.5 to 25.2.1 (#213)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.5 to 25.2.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-04 18:48:29 +09:00
Shohei Ueda
32a0227f7c docs: Add fetch-depth 0
Fetch all history for Hugo feature .GitInfo and .Lastmod
2020-04-04 14:58:15 +09:00
dependabot-preview[bot]
c742786fc9 deps: bump jest-circus from 25.2.6 to 25.2.7 (#209) 2020-04-03 15:45:01 +00:00
dependabot-preview[bot]
7f9aba2ea8 deps: bump jest from 25.2.6 to 25.2.7 (#210) 2020-04-03 15:33:22 +00:00
dependabot-preview[bot]
d48d5de82e deps: bump ts-jest from 25.3.0 to 25.3.1 (#211) 2020-04-03 15:28:17 +00:00
dependabot-preview[bot]
78d67e4cbe deps: bump @types/jest from 25.1.4 to 25.1.5 (#208) 2020-04-03 03:46:27 +00:00
dependabot-preview[bot]
7c0ae727e6 deps: bump jest-circus from 25.2.4 to 25.2.6 (#206) 2020-04-02 11:01:46 +00:00
dependabot-preview[bot]
af6a5970d8 deps: bump jest from 25.2.4 to 25.2.6 (#207) 2020-04-02 10:53:20 +00:00
Shohei Ueda
3789ef4a0a ci: Add cname 2020-04-02 19:34:58 +09:00
dependabot-preview[bot]
42a3ae6a38 deps: bump lint-staged from 10.1.0 to 10.1.1 (#205) 2020-03-31 14:48:26 +00:00
Shohei Ueda
a93c85ca96 docs: update test badge 2020-03-31 21:32:03 +09:00
Shohei Ueda
ed5a99d637 ci: Merge test workflows (#204) 2020-03-31 21:26:20 +09:00
dependabot-preview[bot]
45a2a58fb0 deps: bump @types/node from 12.12.32 to 12.12.34 (#203) 2020-03-31 07:17:40 +00:00
dependabot-preview[bot]
042b824d8b deps: bump @typescript-eslint/parser from 2.25.0 to 2.26.0 (#200) 2020-03-30 18:32:54 +00:00
dependabot-preview[bot]
ca2c254157 deps: bump @typescript-eslint/eslint-plugin from 2.25.0 to 2.26.0 (#201) 2020-03-30 18:26:11 +00:00
dependabot-preview[bot]
3ed76c92c6 deps: bump lint-staged from 10.0.10 to 10.1.0 (#199) 2020-03-30 13:52:38 +00:00
dependabot-preview[bot]
e26a05e473 deps: bump ts-jest from 25.2.1 to 25.3.0 (#198) 2020-03-30 10:19:14 +00:00
peaceiris
d59e15bbd0 docs: Add github_token section 2020-03-30 17:31:13 +09:00
Shohei Ueda
3e53047dc0 docs: fix typo 2020-03-30 17:22:59 +09:00
dependabot-preview[bot]
339315a4b0 deps: bump jest from 25.2.3 to 25.2.4 (#197) 2020-03-29 19:58:23 +00:00
dependabot-preview[bot]
f5eb08fafc deps: bump jest-circus from 25.2.3 to 25.2.4 (#196) 2020-03-29 19:48:08 +00:00
Shohei Ueda
c276f65cf9 docs: Add link to interview (#194)
[GitHub Action Hero: Shohei Ueda - The GitHub Blog](https://github.blog/2020-03-22-github-action-hero-shohei-ueda/)
2020-03-29 23:36:47 +09:00
dependabot-preview[bot]
9dddc3350f deps: bump lint-staged from 10.0.9 to 10.0.10 (#195) 2020-03-29 13:33:34 +00:00
Shohei Ueda
0a1633ac31 ci: bump mdbook from 0.3.5 to 0.3.6 2020-03-29 18:19:30 +09:00
Shohei Ueda
164addf07d docs: bump mdbook from 0.3.5 to 0.3.6 2020-03-29 18:17:51 +09:00
Shohei Ueda
fbff0cd1e0 docs: Improve section name of enable_jekyll (#193) 2020-03-29 18:14:08 +09:00
Shohei Ueda
9597ab97de docs: bump node from 10 to 12 (#192) 2020-03-29 18:08:42 +09:00
Shohei Ueda
014420965c docs: Improve Docusaurus example (#191) 2020-03-29 15:53:22 +09:00
Shohei Ueda
87399813a5 docs: Improve Elm example (#190) 2020-03-29 15:20:03 +09:00
Shohei Ueda
2ea85f7322 docs: Improve Flutter example (#189) 2020-03-29 15:01:07 +09:00
dependabot-preview[bot]
e31acce9d3 deps: bump @types/node from 12.12.31 to 12.12.32 (#187) 2020-03-28 01:41:22 +00:00
dependabot-preview[bot]
25deb782d0 deps: bump jest from 25.2.2 to 25.2.3 (#186) 2020-03-26 21:03:58 +00:00
dependabot-preview[bot]
0e2b180da6 deps: bump jest-circus from 25.2.2 to 25.2.3 (#185) 2020-03-26 20:41:33 +00:00
dependabot-preview[bot]
1b904544aa deps: bump jest-circus from 25.2.1 to 25.2.2 (#183) 2020-03-26 19:05:13 +00:00
dependabot-preview[bot]
85823c67e1 deps: bump jest from 25.2.1 to 25.2.2 (#184) 2020-03-26 19:00:27 +00:00
Shohei Ueda
3183d3481b deps: bump git from 2.25.1 to 2.26.0 (#182) 2020-03-26 21:10:58 +09:00
dependabot-preview[bot]
2be10a7999 deps: bump jest-circus from 25.2.0 to 25.2.1 (#181) 2020-03-26 09:48:36 +00:00
dependabot-preview[bot]
9f0d4d44b9 deps: bump jest from 25.2.0 to 25.2.1 (#180) 2020-03-26 09:43:44 +00:00
dependabot-preview[bot]
669db9c5d1 deps: bump jest-circus from 25.1.0 to 25.2.0 (#178) 2020-03-25 18:25:06 +00:00
dependabot-preview[bot]
75680dae34 deps: bump jest from 25.1.0 to 25.2.0 (#179) 2020-03-25 18:17:22 +00:00
Shohei Ueda
465b328f75 ci: Add dev-image workflow (#177) 2020-03-25 19:37:45 +09:00
Shohei Ueda
7c4605913c chore: Add minify option to ncc 2020-03-25 19:36:13 +09:00
dependabot-preview[bot]
618acc18f3 deps: bump @types/node from 12.12.30 to 12.12.31 (#176) 2020-03-25 08:18:05 +00:00
dependabot-preview[bot]
36c6bd42bd deps: bump @types/js-yaml from 3.12.2 to 3.12.3 (#175) 2020-03-25 05:17:58 +00:00
dependabot-preview[bot]
bb022f3294 deps: bump lint-staged from 10.0.8 to 10.0.9 (#174) 2020-03-24 05:37:23 +00:00
dependabot-preview[bot]
1a3f0fd0f6 deps: bump @zeit/ncc from 0.21.1 to 0.22.0 (#172) 2020-03-24 03:16:45 +00:00
dependabot-preview[bot]
4933c8ef88 deps: bump prettier from 2.0.1 to 2.0.2 (#173) 2020-03-24 03:11:30 +00:00
dependabot-preview[bot]
ecd8e7bc48 deps: bump @typescript-eslint/eslint-plugin from 2.24.0 to 2.25.0 (#171) 2020-03-23 19:33:55 +00:00
dependabot-preview[bot]
04cd6de8fd deps: bump @typescript-eslint/parser from 2.24.0 to 2.25.0 (#170) 2020-03-23 19:27:58 +00:00
Albert
8019d941f3 feat: Set outputs.skip when action skipped
cf. #165
2020-03-22 16:16:36 +09:00
Shohei Ueda
cf8d655310 ci: comment out pull_request event 2020-03-22 16:09:54 +09:00
Shohei Ueda
6cf4da4de2 ci: Add GitHub context dump step [skip ci] 2020-03-22 16:06:43 +09:00
dependabot-preview[bot]
148a6573c6 deps: bump prettier from 1.19.1 to 2.0.1 (#167) 2020-03-22 06:57:08 +00:00
Shohei Ueda
0294e8c526 docs: bump actions/checkout to v2 in Hugo example 2020-03-21 12:51:05 +09:00
Shohei Ueda
2a787f0182 ci: set update_schedule live 2020-03-17 18:51:43 +09:00
dependabot-preview[bot]
62dcd84517 deps: bump @typescript-eslint/eslint-plugin from 2.23.0 to 2.24.0 (#162) 2020-03-17 02:31:36 +00:00
dependabot-preview[bot]
7c5e9bef11 deps: bump @typescript-eslint/parser from 2.23.0 to 2.24.0 (#161) 2020-03-17 02:22:47 +00:00
Shohei Ueda
3f58382eea chore: Print context for debug (#160)
* chore: Print context for debug
* fix: debug message
2020-03-16 13:56:58 +09:00
peaceiris
c50f9fd17d docs: Add link to example 2020-03-16 13:09:31 +09:00
peaceiris
1ee7d6e98a docs: Add path to workflow file 2020-03-16 13:05:28 +09:00
peaceiris
e2a54ec0b9 docs: Add github/personal-website
Add an example workflow for github/personal-website

https://github.com/github/personal-website
2020-03-16 13:01:54 +09:00
peaceiris
9794f98ff1 chore(release): Remove build assets [skip ci] 2020-03-16 12:03:50 +09:00
peaceiris
ba0b7df03e chore(release): 3.5.6
Some checks failed
Release / release (push) Has been cancelled
2020-03-16 12:03:50 +09:00
peaceiris
87a781f6ce chore(release): Add build assets 2020-03-16 12:03:49 +09:00
Shohei Ueda
6fa13fefb3 fix: skip on fork (#159) 2020-03-16 12:03:08 +09:00
peaceiris
efb69e1873 chore(release): Remove build assets [skip ci] 2020-03-16 11:49:23 +09:00
peaceiris
9d932c08b7 chore(release): 3.5.5
Some checks failed
Release / release (push) Has been cancelled
2020-03-16 11:49:22 +09:00
peaceiris
53c9fb0da1 chore(release): Add build assets 2020-03-16 11:49:22 +09:00
Shohei Ueda
d6bd6182f2 fix: skip on fork if pull_request (#158)
cf. #157
2020-03-16 11:48:40 +09:00
peaceiris
01fdaf2f02 chore: Add new task all 2020-03-16 00:43:59 +00:00
peaceiris
75c03d0413 chore(release): Remove build assets [skip ci] 2020-03-16 09:01:39 +09:00
peaceiris
ade70d3851 chore(release): 3.5.4
Some checks failed
Release / release (push) Has been cancelled
2020-03-16 09:01:38 +09:00
peaceiris
abaaadb545 chore(release): Add build assets 2020-03-16 09:01:37 +09:00
Shohei Ueda
4f06df820b fix: skip deployment on forks (#156)
* fix: skip on forks
* chore(release): 3.5.4-6

Close #153
2020-03-16 09:00:19 +09:00
peaceiris
ff31e77830 chore(release): Remove build assets [skip ci] 2020-03-14 06:50:48 +09:00
peaceiris
81f05c5524 chore(release): 3.5.3
Some checks failed
Release / release (push) Has been cancelled
2020-03-14 06:50:47 +09:00
peaceiris
60edcea535 chore(release): Add build assets 2020-03-14 06:50:46 +09:00
dependabot-preview[bot]
2fa0a59e21 deps: [security] bump acorn from 6.4.0 to 6.4.1 (#155) 2020-03-13 21:49:04 +00:00
dependabot-preview[bot]
d1f987783c deps: bump @types/node from 12.12.29 to 12.12.30 (#154) 2020-03-13 19:13:12 +00:00
peaceiris
0466bfb243 chore(release): Remove build assets [skip ci] 2020-03-12 23:24:13 +09:00
peaceiris
a228296ccf chore(release): 3.5.2
Some checks failed
Release / release (push) Has been cancelled
2020-03-12 23:24:13 +09:00
peaceiris
77664235e1 chore(release): Add build assets 2020-03-12 23:24:12 +09:00
Shohei Ueda
a1ff787715 fix: set commit author as local config (#152)
* fix: set commit author as local config

Close #151

Co-authored-by: Ryo Ota <nwtgck@nwtgck.org>
2020-03-12 22:58:12 +09:00
Shohei Ueda
b2788ae3c6 chore: reindent 2020-03-12 09:24:30 +09:00
dependabot-preview[bot]
680198766b deps: bump @typescript-eslint/parser from 2.22.0 to 2.23.0 (#149) 2020-03-10 08:09:38 +00:00
dependabot-preview[bot]
7f32718f66 deps: bump @typescript-eslint/eslint-plugin from 2.22.0 to 2.23.0 (#150) 2020-03-10 07:28:32 +00:00
peaceiris
0404476337 chore(release): Remove build assets [skip ci] 2020-03-09 21:46:01 +09:00
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
41 changed files with 4030 additions and 28497 deletions

View File

@@ -2,8 +2,29 @@ version: 1
update_configs:
- package_manager: "javascript"
directory: "/"
update_schedule: "daily"
update_schedule: "live"
default_labels:
- "dependencies"
commit_message:
prefix: "deps"
automerged_updates:
- match:
dependency_type: "development"
# Supported dependency types:
# - "development"
# - "production"
# - "all"
update_type: "all"
# Supported updates to automerge:
# - "security:patch"
# SemVer patch update that fixes a known security vulnerability
# - "semver:patch"
# SemVer patch update, e.g. > 1.x && 1.0.1 to 1.0.3
# - "semver:minor"
# SemVer minor update, e.g. > 1.x && 2.1.4 to 2.3.1
# - "in_range"
# matching the version requirement in your package manifest
# - "all"
- match:
dependency_type: "production"
update_type: "semver:patch"

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

@@ -1,31 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: 'Bug: This is a sample issue title'
name: Bug Report
about: First, use the User Support Issue Template
title: 'sample_title'
labels: bug
assignees: peaceiris
---
**Describe the bug**
### Describe the bug
A clear and concise description of what the bug is.
**To Reproduce**
### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
### Expected behavior
A clear and concise description of what you expected to happen.
**Screenshots**
### Screenshots
If applicable, add screenshots to help explain your problem.
**Your YAML file**
### Your YAML file
- A link to your repository
- A link to your YAML file
**Additional context**
### Additional context
Add any other context about the problem here.

View File

@@ -1,20 +1,24 @@
---
name: Proposal
about: Suggest an idea for this project
title: 'proposal: This is a sample title'
title: 'sample_title'
labels: proposal
assignees: peaceiris
---
**Is your feature request related to a problem? Please describe.**
### Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
### Describe the solution you'd like
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
### Additional context
Add any other context or screenshots about the feature request here.

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.

37
.github/workflows/dev-image.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: 'Dev Image CI'
on:
push:
branches:
- master
paths:
- '.github/workflows/dev-image.yml'
- '.dockerignore'
- '.nvmrc'
- 'Dockerfile'
- 'Makefile'
pull_request:
types:
- opened
- synchronize
paths:
- '.github/workflows/dev-image.yml'
- '.dockerignore'
- '.nvmrc'
- 'Dockerfile'
- 'Makefile'
jobs:
skipci:
runs-on: ubuntu-18.04
steps:
- run: echo "[skip ci] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
dev-image-test:
runs-on: ubuntu-18.04
if: contains(github.event.head_commit.message, '[skip ci]') == false
steps:
- uses: actions/checkout@v2
- run: make build
- run: make cirun cmd="npm ci"
- run: make ciall

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

@@ -1,17 +0,0 @@
name: "Stale"
on:
schedule:
- cron: "6 6 * * *"
jobs:
stale:
runs-on: ubuntu-18.04
steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
stale-pr-message: 'This pull request is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
days-before-stale: 21
days-before-close: 7

View File

@@ -1,105 +0,0 @@
name: Test Action
on:
push:
branches:
- master
paths-ignore:
- '*.md'
pull_request:
types:
- opened
- synchronize
paths-ignore:
- '*.md'
jobs:
skipci:
runs-on: ubuntu-18.04
steps:
- run: echo "[Skip CI] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
test:
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'
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- 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
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.5'
- name: Build
working-directory: ./test_projects/mdbook
run: mdbook build
- name: Prepare tag
id: prepare_tag
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG_NAME="${GITHUB_REF##refs/tags/}"
echo "::set-output name=tag_name::${TAG_NAME}"
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: 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
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 }}'

View File

@@ -17,7 +17,7 @@ jobs:
skipci:
runs-on: ubuntu-18.04
steps:
- run: echo "[Skip CI] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
- run: echo "[skip ci] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
test:
runs-on: ${{ matrix.os }}
@@ -26,12 +26,17 @@ jobs:
matrix:
os:
- 'ubuntu-18.04'
- 'ubuntu-16.04'
- 'macos-latest'
- 'windows-latest'
steps:
- uses: actions/checkout@v2
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Read .nvmrc
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm
@@ -41,24 +46,206 @@ 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
if: startsWith(matrix.os, 'ubuntu')
if: startsWith(matrix.os, 'ubuntu-18.04')
run: npm run format:check
- name: Run eslint
if: startsWith(matrix.os, 'ubuntu')
if: startsWith(matrix.os, 'ubuntu-18.04')
run: npm run lint
- name: Run ncc
if: startsWith(matrix.os, 'ubuntu')
run: npm run build
- run: npm test
- name: Upload test coverage as artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
with:
name: coverage
name: coverage-${{ matrix.os }}
path: coverage
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run ncc
run: npm run build
- name: Remove lint-staged husky
if: github.ref == 'refs/heads/master'
run: |
npm uninstall lint-staged husky
git checkout package-lock.json package.json
- name: Setup mdBook
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.7'
- name: Build site
if: github.ref == 'refs/heads/master'
working-directory: ./test_projects/mdbook
run: mdbook build
- name: Deploy
if: |
startsWith(matrix.os, 'ubuntu-18.04') &&
github.ref == 'refs/heads/master'
uses: ./
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# github_token: ${{ secrets.GITHUB_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: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
# commit_message: ${{ github.event.head_commit.message }}
cname: 'actions-gh-pages.peaceiris.com'
- name: Deploy
if: |
startsWith(matrix.os, 'ubuntu-16.04') &&
github.ref == 'refs/heads/master'
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages-ubuntu-16.04
publish_dir: ./test_projects/mdbook/book
# external_repository: ''
allow_empty_commit: true
keep_files: true
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
full_commit_message: ${{ github.event.head_commit.message }}
- name: Deploy
if: |
startsWith(matrix.os, 'macos') &&
github.ref == 'refs/heads/master'
uses: ./
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# github_token: ${{ secrets.GITHUB_TOKEN }}
# personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_branch: gh-pages-macos
publish_dir: ./test_projects/mdbook/book
# external_repository: ''
allow_empty_commit: true
# keep_files: 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 }}
- name: Deploy
if: |
startsWith(matrix.os, 'windows') &&
github.ref == 'refs/heads/master'
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_branch: gh-pages-windows
publish_dir: ./test_projects/mdbook/book
# external_repository: ''
allow_empty_commit: true
# keep_files: 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 }}
test-ubuntu-2004:
runs-on: 'ubuntu-18.04'
if: contains(github.event.head_commit.message, '[skip ci]') == false
container:
image: 'ubuntu:20.04'
steps:
- name: Install deps
run: |
apt update
apt install -y software-properties-common
add-apt-repository ppa:git-core/ppa
apt update
apt install -y \
git \
ssh
- uses: actions/checkout@v2
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Read .nvmrc
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm
- name: Setup Node
uses: actions/setup-node@v1
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
- run: npm test
- name: Run ncc
run: npm run build
- name: Remove lint-staged husky
if: github.ref == 'refs/heads/master'
run: |
npm uninstall lint-staged husky
git checkout package-lock.json package.json
- name: Setup mdBook
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.7'
- name: Build site
if: github.ref == 'refs/heads/master'
working-directory: ./test_projects/mdbook
run: mdbook build
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages-ubuntu-20.04
publish_dir: ./test_projects/mdbook/book
# external_repository: ''
allow_empty_commit: true
# keep_files: 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 }}

2
.nvmrc
View File

@@ -1 +1 @@
12.15.0
12.16.3

View File

@@ -2,6 +2,511 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [3.6.1](https://github.com/peaceiris/actions-gh-pages/compare/v3.6.0...v3.6.1) (2020-05-04)
### docs
* Add example image for commit_message ([f559ed8](https://github.com/peaceiris/actions-gh-pages/commit/f559ed8889a7ba2364757bc7a97b0491263147ff))
### feat
* Fold logs using core.startGroup() (#277) ([db3e60d](https://github.com/peaceiris/actions-gh-pages/commit/db3e60d230c7ebcd5342990f0ffc5af0ed1f4296)), closes [#277](https://github.com/peaceiris/actions-gh-pages/issues/277)
### test
* Add test case for getCommitMessage() (#276) ([5041814](https://github.com/peaceiris/actions-gh-pages/commit/504181401bb2df2de020ed72a7f2b4f8942bcb77)), closes [#276](https://github.com/peaceiris/actions-gh-pages/issues/276)
# [3.6.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.10...v3.6.0) (2020-05-04)
### chore
* Enhance style ([750c807](https://github.com/peaceiris/actions-gh-pages/commit/750c807fa1ecf9d3d455cfd0fb5533442c660a1e))
### ci
* Add test-ubuntu-20.04 job (#270) ([7501463](https://github.com/peaceiris/actions-gh-pages/commit/75014632413b319cb87db5b3e54bba2d6a21ac05)), closes [#270](https://github.com/peaceiris/actions-gh-pages/issues/270) [#268](https://github.com/peaceiris/actions-gh-pages/issues/268)
* use github_token ([9d27fac](https://github.com/peaceiris/actions-gh-pages/commit/9d27fac8dcdc50937d59b3068c59acf257ad2398))
### deps
* bump @actions/core from 1.2.3 to 1.2.4 (#265) ([dd1933a](https://github.com/peaceiris/actions-gh-pages/commit/dd1933a7b4b77a06b1995b0e8c40b6c219f32550)), closes [#265](https://github.com/peaceiris/actions-gh-pages/issues/265)
* bump jest from 25.5.2 to 25.5.3 (#267) ([e782e1d](https://github.com/peaceiris/actions-gh-pages/commit/e782e1d32332c2e99058a039dd5caaf0533d0af6)), closes [#267](https://github.com/peaceiris/actions-gh-pages/issues/267)
* bump jest from 25.5.3 to 25.5.4 (#272) ([ae34186](https://github.com/peaceiris/actions-gh-pages/commit/ae34186caa187c2960bae6d656f6ef69c6aa0fba)), closes [#272](https://github.com/peaceiris/actions-gh-pages/issues/272)
* bump jest-circus from 25.5.2 to 25.5.3 (#266) ([c12a4b1](https://github.com/peaceiris/actions-gh-pages/commit/c12a4b1908457ab10af84e0947b66af3f868790c)), closes [#266](https://github.com/peaceiris/actions-gh-pages/issues/266)
* bump jest-circus from 25.5.3 to 25.5.4 (#271) ([a5d411b](https://github.com/peaceiris/actions-gh-pages/commit/a5d411bf285983883daecb16787a8f6549da66d8)), closes [#271](https://github.com/peaceiris/actions-gh-pages/issues/271)
* bump lint-staged from 10.2.0 to 10.2.1 (#264) ([0809306](https://github.com/peaceiris/actions-gh-pages/commit/08093066ac77639e402a4b60492a7759c395ba36)), closes [#264](https://github.com/peaceiris/actions-gh-pages/issues/264)
* bump lint-staged from 10.2.1 to 10.2.2 (#269) ([b9cccec](https://github.com/peaceiris/actions-gh-pages/commit/b9cccec41e2e47ef704d34a7409dc07a50e32d46)), closes [#269](https://github.com/peaceiris/actions-gh-pages/issues/269)
### feat
* Add full_commit_message (#275) ([0b7411e](https://github.com/peaceiris/actions-gh-pages/commit/0b7411e2cf05b033f6766798560d02e932e01bd2)), closes [#275](https://github.com/peaceiris/actions-gh-pages/issues/275) [#274](https://github.com/peaceiris/actions-gh-pages/issues/274)
## [3.5.10](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.9...v3.5.10) (2020-04-30)
### deps
* bump jest from 25.5.1 to 25.5.2 (#260) ([714f710](https://github.com/peaceiris/actions-gh-pages/commit/714f7109225b609d3303bb0cd6f459690a9165b6)), closes [#260](https://github.com/peaceiris/actions-gh-pages/issues/260)
* bump jest-circus from 25.5.1 to 25.5.2 (#259) ([813be06](https://github.com/peaceiris/actions-gh-pages/commit/813be0645e175e6e475ada4f9cc922daeeade00a)), closes [#259](https://github.com/peaceiris/actions-gh-pages/issues/259)
### docs
* Add ubuntu-16.04 ([d9f616f](https://github.com/peaceiris/actions-gh-pages/commit/d9f616f4a278b6c334ce6dea09e69ba698459b38)), closes [#263](https://github.com/peaceiris/actions-gh-pages/issues/263)
* bump actions/setup-python from v1 to v2 (#262) ([029c1a0](https://github.com/peaceiris/actions-gh-pages/commit/029c1a08f9594e3b2c581d78c258cc8e9c66f96c)), closes [#262](https://github.com/peaceiris/actions-gh-pages/issues/262)
* bump python from 3.6 to 3.8 ([eafac7a](https://github.com/peaceiris/actions-gh-pages/commit/eafac7a3ef405ea76543c2c7995b64a19a1695c0))
* change to job level defaults ([20d80bc](https://github.com/peaceiris/actions-gh-pages/commit/20d80bcd8cdfda9728f3c0befe2aa5052209ea50))
* Enhance Python workflow example (#261) ([e4462d9](https://github.com/peaceiris/actions-gh-pages/commit/e4462d9bb679154cb07cca446c8e12c692610838)), closes [#261](https://github.com/peaceiris/actions-gh-pages/issues/261)
* Enhance Supported Platforms ([91e6658](https://github.com/peaceiris/actions-gh-pages/commit/91e6658ef01bbd482a965675988a765faad5fce5))
### feat
* Support ubuntu-16.04 (#263) ([e76c874](https://github.com/peaceiris/actions-gh-pages/commit/e76c874d85f0c0e45f3602fe4a85a15feb87610c)), closes [#263](https://github.com/peaceiris/actions-gh-pages/issues/263)
## [3.5.9](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.8...v3.5.9) (2020-04-29)
### chore
* bump node from 12.16.2 to 12.16.3 ([e5aa21b](https://github.com/peaceiris/actions-gh-pages/commit/e5aa21b8a847df106ce694432a6cac78300266a3))
### deps
* [security] bump @actions/http-client from 1.0.6 to 1.0.8 (#258) ([d217882](https://github.com/peaceiris/actions-gh-pages/commit/d2178821cb5968f5b7c818210297f3dbeea3114c)), closes [#258](https://github.com/peaceiris/actions-gh-pages/issues/258)
* bump @actions/exec from 1.0.3 to 1.0.4 (#254) ([6cb5962](https://github.com/peaceiris/actions-gh-pages/commit/6cb5962c014ba1196680337447c834590d907bde)), closes [#254](https://github.com/peaceiris/actions-gh-pages/issues/254)
* bump jest from 25.5.0 to 25.5.1 (#257) ([6462e1b](https://github.com/peaceiris/actions-gh-pages/commit/6462e1bf5e8ba9325ae66bacba198b12c7e101ed)), closes [#257](https://github.com/peaceiris/actions-gh-pages/issues/257)
* bump jest-circus from 25.5.0 to 25.5.1 (#256) ([051ddfc](https://github.com/peaceiris/actions-gh-pages/commit/051ddfc79a0bbbdd8e623367741645052c63fb9a)), closes [#256](https://github.com/peaceiris/actions-gh-pages/issues/256)
* bump node from 12.16.2 to 12.16.3 (#255) ([f191fb8](https://github.com/peaceiris/actions-gh-pages/commit/f191fb81878aaa8657d346e9b3a97a4ad625939d)), closes [#255](https://github.com/peaceiris/actions-gh-pages/issues/255)
* bump prettier from 2.0.4 to 2.0.5 (#253) ([33b82d2](https://github.com/peaceiris/actions-gh-pages/commit/33b82d2be041389aa51ca38f09cf6e79a9129035)), closes [#253](https://github.com/peaceiris/actions-gh-pages/issues/253)
## [3.5.8](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.7...v3.5.8) (2020-04-29)
### chore
* Add issue priority [skip ci] ([eda4527](https://github.com/peaceiris/actions-gh-pages/commit/eda4527addb918b2101150ebb39fcf433918edaa))
* Add issue priority [skip ci] ([af61d81](https://github.com/peaceiris/actions-gh-pages/commit/af61d81606e4fc7e288136ff2d253e2bc55c4f48))
* enhance about [skip ci] ([1139364](https://github.com/peaceiris/actions-gh-pages/commit/1139364d4c33266789f7b3325cf9a44a8547dfd2))
* update [skip ci] ([86114bb](https://github.com/peaceiris/actions-gh-pages/commit/86114bb2c7af49107a982228b5bdb03680d01f4d))
### ci
* Add hook for doctoc (#244) ([e3404eb](https://github.com/peaceiris/actions-gh-pages/commit/e3404eb04b31f2987120c926fea07b0213caebd8)), closes [#244](https://github.com/peaceiris/actions-gh-pages/issues/244)
### deps
* bump @types/node from 12.12.35 to 12.12.36 (#238) ([b7c9581](https://github.com/peaceiris/actions-gh-pages/commit/b7c9581509f430da7d5fd97e37245a2d0a66b564)), closes [#238](https://github.com/peaceiris/actions-gh-pages/issues/238)
* bump @types/node from 12.12.36 to 12.12.37 (#251) ([7b01d76](https://github.com/peaceiris/actions-gh-pages/commit/7b01d765e76fa62e2452fd444f2b4c27a2a93821)), closes [#251](https://github.com/peaceiris/actions-gh-pages/issues/251)
* bump @typescript-eslint/eslint-plugin from 2.28.0 to 2.30.0 (#252) ([f97b3d2](https://github.com/peaceiris/actions-gh-pages/commit/f97b3d256ec802bf086d5c96dcb299a63b38f705)), closes [#252](https://github.com/peaceiris/actions-gh-pages/issues/252)
* bump @typescript-eslint/parser from 2.28.0 to 2.30.0 (#249) ([28e7732](https://github.com/peaceiris/actions-gh-pages/commit/28e7732e93caf2520c542d47eb7482a09d92399d)), closes [#249](https://github.com/peaceiris/actions-gh-pages/issues/249)
* bump git from 2.26.1 to 2.26.2 (#246) ([db7681d](https://github.com/peaceiris/actions-gh-pages/commit/db7681db4d6bba0e054efa7da8d6494f40aa74dd)), closes [#246](https://github.com/peaceiris/actions-gh-pages/issues/246)
* bump jest from 25.3.0 to 25.5.0 (#248) ([390b063](https://github.com/peaceiris/actions-gh-pages/commit/390b063535b4dc9533b19e2bdc0a5c756725bcd3)), closes [#248](https://github.com/peaceiris/actions-gh-pages/issues/248)
* bump jest-circus from 25.3.0 to 25.5.0 (#247) ([50bcf7b](https://github.com/peaceiris/actions-gh-pages/commit/50bcf7b81dbedbab7f9d8c9cebc15c1d63724e52)), closes [#247](https://github.com/peaceiris/actions-gh-pages/issues/247)
* bump lint-staged from 10.1.3 to 10.1.4 (#237) ([fd97637](https://github.com/peaceiris/actions-gh-pages/commit/fd976371344295a7f93bf199bc5557ef179ccb8c)), closes [#237](https://github.com/peaceiris/actions-gh-pages/issues/237)
* bump lint-staged from 10.1.4 to 10.1.5 (#240) ([cfc119f](https://github.com/peaceiris/actions-gh-pages/commit/cfc119fff765ff9d58364aaacc6f3eeda2cfa803)), closes [#240](https://github.com/peaceiris/actions-gh-pages/issues/240)
* bump lint-staged from 10.1.5 to 10.1.6 (#241) ([c1bc06c](https://github.com/peaceiris/actions-gh-pages/commit/c1bc06c3e6c64d6663aaaddce19c3092f44fee76)), closes [#241](https://github.com/peaceiris/actions-gh-pages/issues/241)
* bump lint-staged from 10.1.6 to 10.2.0 (#250) ([4976317](https://github.com/peaceiris/actions-gh-pages/commit/4976317340cc18cda0238fb97829a0faaa845961)), closes [#250](https://github.com/peaceiris/actions-gh-pages/issues/250)
* bump ts-jest from 25.3.1 to 25.4.0 (#236) ([f69bcb9](https://github.com/peaceiris/actions-gh-pages/commit/f69bcb9ae88328fdbf841072c8d6273cd64775d0)), closes [#236](https://github.com/peaceiris/actions-gh-pages/issues/236)
### docs
* Add publish_branch and publish_dir (#239) ([4b0ac94](https://github.com/peaceiris/actions-gh-pages/commit/4b0ac9453b6b8c117d2d477feec9438cbadde554)), closes [#239](https://github.com/peaceiris/actions-gh-pages/issues/239)
* Enhance cache key (#235) ([f1ebad9](https://github.com/peaceiris/actions-gh-pages/commit/f1ebad9abbd9a38f40b3bf1731c8f24d11933c7f)), closes [#235](https://github.com/peaceiris/actions-gh-pages/issues/235)
* Enhance Docusaurus example workflow (#234) ([63cdebd](https://github.com/peaceiris/actions-gh-pages/commit/63cdebd96bf13f045ac949edf7242044ecfef525)), closes [#234](https://github.com/peaceiris/actions-gh-pages/issues/234)
* Enhance the Tips and FAQ section ([1511f85](https://github.com/peaceiris/actions-gh-pages/commit/1511f85febf4d985083555b7e644fc43582ec4ee))
* update ([8632fea](https://github.com/peaceiris/actions-gh-pages/commit/8632feabc7064b8023ffa7da92bf6d91cf83a0fe))
* update ([7d421d3](https://github.com/peaceiris/actions-gh-pages/commit/7d421d3e4c784eaebafdf020ccf4ce29ac14569a))
* update ([95d87cf](https://github.com/peaceiris/actions-gh-pages/commit/95d87cfaa53b3d799c1c931048a43a92ddb87d15))
## [3.5.7](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.6...v3.5.7) (2020-04-15)
### chore
* Add minify option to ncc ([7c46059](https://github.com/peaceiris/actions-gh-pages/commit/7c4605913c8e25e5bcb647c41df24622df973dea))
* bump node and npm (#232) ([8dd38be](https://github.com/peaceiris/actions-gh-pages/commit/8dd38bec4d0fe06da1c552846e91f1c9482eaa81)), closes [#232](https://github.com/peaceiris/actions-gh-pages/issues/232)
* Print context for debug (#160) ([3f58382](https://github.com/peaceiris/actions-gh-pages/commit/3f58382eeacaa13844a32b1499dd97073c0c134e)), closes [#160](https://github.com/peaceiris/actions-gh-pages/issues/160)
### ci
* Add automerged_updates ([6d889ad](https://github.com/peaceiris/actions-gh-pages/commit/6d889ad7e96ddde23d10af55c91bc853e7ae6875))
* Add cname ([3789ef4](https://github.com/peaceiris/actions-gh-pages/commit/3789ef4a0afefde589ddc2627f1e15c9b781bf8e))
* Add dev-image workflow (#177) ([465b328](https://github.com/peaceiris/actions-gh-pages/commit/465b328f7559c99f1baf1b953e51031e9e95cb3c)), closes [#177](https://github.com/peaceiris/actions-gh-pages/issues/177)
* Add GitHub context dump step [skip ci] ([6cf4da4](https://github.com/peaceiris/actions-gh-pages/commit/6cf4da4de2c6a448403c94c765853e21ec9c59d9))
* bump mdbook from 0.3.5 to 0.3.6 ([0a1633a](https://github.com/peaceiris/actions-gh-pages/commit/0a1633ac3140c8be2e2eded5961aa2a17831328e))
* comment out pull_request event ([cf8d655](https://github.com/peaceiris/actions-gh-pages/commit/cf8d65531019ee6fb9bae2ce615c7c7735073cac))
* delete stale workflow ([98e0f60](https://github.com/peaceiris/actions-gh-pages/commit/98e0f6025c650cd5e0bafe454a78754e170fd08d))
* Merge test workflows (#204) ([ed5a99d](https://github.com/peaceiris/actions-gh-pages/commit/ed5a99d6377a295a05189f1dac5bc9e32739fced)), closes [#204](https://github.com/peaceiris/actions-gh-pages/issues/204)
* set update_schedule live ([2a787f0](https://github.com/peaceiris/actions-gh-pages/commit/2a787f018275ed6400c555b0144e8f15b9c3db4f))
### deps
* bump @types/jest from 25.1.4 to 25.1.5 (#208) ([78d67e4](https://github.com/peaceiris/actions-gh-pages/commit/78d67e4cbe7435ac1848ba5f4e5be1598dd0f843)), closes [#208](https://github.com/peaceiris/actions-gh-pages/issues/208)
* bump @types/jest from 25.1.5 to 25.2.1 (#213) ([37ce049](https://github.com/peaceiris/actions-gh-pages/commit/37ce049d087d29dae2d276e0df6665258c979d66)), closes [#213](https://github.com/peaceiris/actions-gh-pages/issues/213)
* bump @types/js-yaml from 3.12.2 to 3.12.3 (#175) ([36c6bd4](https://github.com/peaceiris/actions-gh-pages/commit/36c6bd42bd9f29c9b6b8e157bd9e41da701fb77e)), closes [#175](https://github.com/peaceiris/actions-gh-pages/issues/175)
* bump @types/node from 12.12.30 to 12.12.31 (#176) ([618acc1](https://github.com/peaceiris/actions-gh-pages/commit/618acc18f38ea8866cb92509e5a1fb33e5b475cb)), closes [#176](https://github.com/peaceiris/actions-gh-pages/issues/176)
* bump @types/node from 12.12.31 to 12.12.32 (#187) ([e31acce](https://github.com/peaceiris/actions-gh-pages/commit/e31acce9d332395ce09ec79567979ad6afc2083a)), closes [#187](https://github.com/peaceiris/actions-gh-pages/issues/187)
* bump @types/node from 12.12.32 to 12.12.34 (#203) ([45a2a58](https://github.com/peaceiris/actions-gh-pages/commit/45a2a58fb026bdd007fc960472e4c64cac3d1742)), closes [#203](https://github.com/peaceiris/actions-gh-pages/issues/203)
* bump @types/node from 12.12.34 to 12.12.35 (#222) ([8af9b8c](https://github.com/peaceiris/actions-gh-pages/commit/8af9b8c0d5a79ac59deca7c805b3dbb2f27b6637)), closes [#222](https://github.com/peaceiris/actions-gh-pages/issues/222)
* bump @typescript-eslint/eslint-plugin from 2.23.0 to 2.24.0 (#162) ([62dcd84](https://github.com/peaceiris/actions-gh-pages/commit/62dcd84517adc033e68d52d0a32e2d5edaa1a3c3)), closes [#162](https://github.com/peaceiris/actions-gh-pages/issues/162)
* bump @typescript-eslint/eslint-plugin from 2.24.0 to 2.25.0 (#171) ([ecd8e7b](https://github.com/peaceiris/actions-gh-pages/commit/ecd8e7bc48e57d3ea82184116fa1710c425d57a6)), closes [#171](https://github.com/peaceiris/actions-gh-pages/issues/171)
* bump @typescript-eslint/eslint-plugin from 2.25.0 to 2.26.0 (#201) ([ca2c254](https://github.com/peaceiris/actions-gh-pages/commit/ca2c2541577d3e41f6c7c2265430a219b974c314)), closes [#201](https://github.com/peaceiris/actions-gh-pages/issues/201)
* bump @typescript-eslint/eslint-plugin from 2.26.0 to 2.27.0 (#219) ([046c703](https://github.com/peaceiris/actions-gh-pages/commit/046c703d6daeac7f9c32fbd0adf9f1412b025361)), closes [#219](https://github.com/peaceiris/actions-gh-pages/issues/219)
* bump @typescript-eslint/eslint-plugin from 2.27.0 to 2.28.0 (#231) ([ddf2c5b](https://github.com/peaceiris/actions-gh-pages/commit/ddf2c5b9f16b38116d8f194ed9804fe079d950ca)), closes [#231](https://github.com/peaceiris/actions-gh-pages/issues/231)
* bump @typescript-eslint/parser from 2.23.0 to 2.24.0 (#161) ([7c5e9be](https://github.com/peaceiris/actions-gh-pages/commit/7c5e9bef11bc4c1a57fd1f7794c93518f320293d)), closes [#161](https://github.com/peaceiris/actions-gh-pages/issues/161)
* bump @typescript-eslint/parser from 2.24.0 to 2.25.0 (#170) ([04cd6de](https://github.com/peaceiris/actions-gh-pages/commit/04cd6de8fd7f30f0c3c725e3981a6f8e549f19fa)), closes [#170](https://github.com/peaceiris/actions-gh-pages/issues/170)
* bump @typescript-eslint/parser from 2.25.0 to 2.26.0 (#200) ([042b824](https://github.com/peaceiris/actions-gh-pages/commit/042b824d8bb5cde606db907ffc0edd525b9557f1)), closes [#200](https://github.com/peaceiris/actions-gh-pages/issues/200)
* bump @typescript-eslint/parser from 2.26.0 to 2.27.0 (#218) ([da14e08](https://github.com/peaceiris/actions-gh-pages/commit/da14e086461d30a80a0c62fb0ee531635c021a92)), closes [#218](https://github.com/peaceiris/actions-gh-pages/issues/218)
* bump @typescript-eslint/parser from 2.27.0 to 2.28.0 (#230) ([d8356e3](https://github.com/peaceiris/actions-gh-pages/commit/d8356e3cf1b99104b423cfeb405751ce358b46f1)), closes [#230](https://github.com/peaceiris/actions-gh-pages/issues/230)
* bump @zeit/ncc from 0.21.1 to 0.22.0 (#172) ([1a3f0fd](https://github.com/peaceiris/actions-gh-pages/commit/1a3f0fd0f6ec1a0544e7489db322e559823f3538)), closes [#172](https://github.com/peaceiris/actions-gh-pages/issues/172)
* bump @zeit/ncc from 0.22.0 to 0.22.1 (#215) ([711b0ed](https://github.com/peaceiris/actions-gh-pages/commit/711b0ed1cd911cef0808ec5fe090f240fb3e804e)), closes [#215](https://github.com/peaceiris/actions-gh-pages/issues/215)
* bump git from 2.25.1 to 2.26.0 (#182) ([3183d34](https://github.com/peaceiris/actions-gh-pages/commit/3183d3481b7ef83750e6365ea9f28258df85c5f7)), closes [#182](https://github.com/peaceiris/actions-gh-pages/issues/182)
* bump git from 2.26.0 to 2.26.1 (#233) ([df5698c](https://github.com/peaceiris/actions-gh-pages/commit/df5698c4aaaf8edee82ce0d2799caddde3d2f6bc)), closes [#233](https://github.com/peaceiris/actions-gh-pages/issues/233)
* bump husky from 4.2.3 to 4.2.4 (#225) ([abd7ea5](https://github.com/peaceiris/actions-gh-pages/commit/abd7ea550b2efa7ba4353ed178a5cceab5741b4e)), closes [#225](https://github.com/peaceiris/actions-gh-pages/issues/225)
* bump husky from 4.2.4 to 4.2.5 (#226) ([bf8dc2c](https://github.com/peaceiris/actions-gh-pages/commit/bf8dc2ce19690fde3f8f875f0b56726a8467f043)), closes [#226](https://github.com/peaceiris/actions-gh-pages/issues/226)
* bump jest from 25.1.0 to 25.2.0 (#179) ([75680da](https://github.com/peaceiris/actions-gh-pages/commit/75680dae34ad8b6811ee6482a809d0be3f24c743)), closes [#179](https://github.com/peaceiris/actions-gh-pages/issues/179)
* bump jest from 25.2.0 to 25.2.1 (#180) ([9f0d4d4](https://github.com/peaceiris/actions-gh-pages/commit/9f0d4d44b9782b3baa0c97b515061b16a78a4ccd)), closes [#180](https://github.com/peaceiris/actions-gh-pages/issues/180)
* bump jest from 25.2.1 to 25.2.2 (#184) ([85823c6](https://github.com/peaceiris/actions-gh-pages/commit/85823c67e1a6ee02bca13ad66bdedcaf932f7fb8)), closes [#184](https://github.com/peaceiris/actions-gh-pages/issues/184)
* bump jest from 25.2.2 to 25.2.3 (#186) ([25deb78](https://github.com/peaceiris/actions-gh-pages/commit/25deb782d00a799f89ae56a01471de34eb584507)), closes [#186](https://github.com/peaceiris/actions-gh-pages/issues/186)
* bump jest from 25.2.3 to 25.2.4 (#197) ([339315a](https://github.com/peaceiris/actions-gh-pages/commit/339315a4b0911f7ba5f46b48517303a51ab3c9de)), closes [#197](https://github.com/peaceiris/actions-gh-pages/issues/197)
* bump jest from 25.2.4 to 25.2.6 (#207) ([af6a597](https://github.com/peaceiris/actions-gh-pages/commit/af6a5970d8665fe405d2d41739a205fb02c3c82b)), closes [#207](https://github.com/peaceiris/actions-gh-pages/issues/207)
* bump jest from 25.2.6 to 25.2.7 (#210) ([7f9aba2](https://github.com/peaceiris/actions-gh-pages/commit/7f9aba2ea85c816a7bc7d764386db0d22fb27664)), closes [#210](https://github.com/peaceiris/actions-gh-pages/issues/210)
* bump jest from 25.2.7 to 25.3.0 (#221) ([a07d711](https://github.com/peaceiris/actions-gh-pages/commit/a07d7115c5ba0974e1cc521c12f921344a5cb740)), closes [#221](https://github.com/peaceiris/actions-gh-pages/issues/221)
* bump jest-circus from 25.1.0 to 25.2.0 (#178) ([669db9c](https://github.com/peaceiris/actions-gh-pages/commit/669db9c5d1ea78f2fe5e844401803de4ebd79516)), closes [#178](https://github.com/peaceiris/actions-gh-pages/issues/178)
* bump jest-circus from 25.2.0 to 25.2.1 (#181) ([2be10a7](https://github.com/peaceiris/actions-gh-pages/commit/2be10a799985a223581c2368b866882d2a13515c)), closes [#181](https://github.com/peaceiris/actions-gh-pages/issues/181)
* bump jest-circus from 25.2.1 to 25.2.2 (#183) ([1b90454](https://github.com/peaceiris/actions-gh-pages/commit/1b904544aa6f23628ab65efd7399f9b22406bddf)), closes [#183](https://github.com/peaceiris/actions-gh-pages/issues/183)
* bump jest-circus from 25.2.2 to 25.2.3 (#185) ([0e2b180](https://github.com/peaceiris/actions-gh-pages/commit/0e2b180da6b0035c64940c6fcbcdfd16fc02ab1f)), closes [#185](https://github.com/peaceiris/actions-gh-pages/issues/185)
* bump jest-circus from 25.2.3 to 25.2.4 (#196) ([f5eb08f](https://github.com/peaceiris/actions-gh-pages/commit/f5eb08fafcb4f22c6636badd1d35676cfec90f57)), closes [#196](https://github.com/peaceiris/actions-gh-pages/issues/196)
* bump jest-circus from 25.2.4 to 25.2.6 (#206) ([7c0ae72](https://github.com/peaceiris/actions-gh-pages/commit/7c0ae727e6ff477fc420bd0fc74f6c706b433508)), closes [#206](https://github.com/peaceiris/actions-gh-pages/issues/206)
* bump jest-circus from 25.2.6 to 25.2.7 (#209) ([c742786](https://github.com/peaceiris/actions-gh-pages/commit/c742786fc9fe33aa256482960f82f3e9e3e7e591)), closes [#209](https://github.com/peaceiris/actions-gh-pages/issues/209)
* bump jest-circus from 25.2.7 to 25.3.0 (#220) ([20e19cf](https://github.com/peaceiris/actions-gh-pages/commit/20e19cf1eb238cb2bdeb1ce8c4a586586433b1ab)), closes [#220](https://github.com/peaceiris/actions-gh-pages/issues/220)
* bump lint-staged from 10.0.10 to 10.1.0 (#199) ([3ed76c9](https://github.com/peaceiris/actions-gh-pages/commit/3ed76c92c68fe6ce8abdec7c18ce08cd4fc73f5d)), closes [#199](https://github.com/peaceiris/actions-gh-pages/issues/199)
* bump lint-staged from 10.0.8 to 10.0.9 (#174) ([bb022f3](https://github.com/peaceiris/actions-gh-pages/commit/bb022f3294a46c3cb76aabad2a3c6256f4d94f4a)), closes [#174](https://github.com/peaceiris/actions-gh-pages/issues/174)
* bump lint-staged from 10.0.9 to 10.0.10 (#195) ([9dddc33](https://github.com/peaceiris/actions-gh-pages/commit/9dddc3350fb83f9b17f09d2ae0df8cfe821d3091)), closes [#195](https://github.com/peaceiris/actions-gh-pages/issues/195)
* bump lint-staged from 10.1.0 to 10.1.1 (#205) ([42a3ae6](https://github.com/peaceiris/actions-gh-pages/commit/42a3ae6a382b047d97c25c18d069c9403b957d2f)), closes [#205](https://github.com/peaceiris/actions-gh-pages/issues/205)
* bump lint-staged from 10.1.1 to 10.1.2 (#214) ([e5063fa](https://github.com/peaceiris/actions-gh-pages/commit/e5063fa6dd73e5a0d63f79a29ce874029949af00)), closes [#214](https://github.com/peaceiris/actions-gh-pages/issues/214)
* bump lint-staged from 10.1.2 to 10.1.3 (#224) ([ab7b255](https://github.com/peaceiris/actions-gh-pages/commit/ab7b25543231b886faf8f1cf63fd5085eeedf796)), closes [#224](https://github.com/peaceiris/actions-gh-pages/issues/224)
* bump node 12.16.1 to 12.16.2 (#223) ([6fcf128](https://github.com/peaceiris/actions-gh-pages/commit/6fcf128c187d621040cda918d737c816339b2268)), closes [#223](https://github.com/peaceiris/actions-gh-pages/issues/223)
* bump prettier from 1.19.1 to 2.0.1 (#167) ([148a657](https://github.com/peaceiris/actions-gh-pages/commit/148a6573c6b840a7235933a411b6807f0914adc0)), closes [#167](https://github.com/peaceiris/actions-gh-pages/issues/167)
* bump prettier from 2.0.1 to 2.0.2 (#173) ([4933c8e](https://github.com/peaceiris/actions-gh-pages/commit/4933c8ef88a7aba30905620f3b3cd2b2c516dd19)), closes [#173](https://github.com/peaceiris/actions-gh-pages/issues/173)
* bump prettier from 2.0.2 to 2.0.4 (#217) ([ab37125](https://github.com/peaceiris/actions-gh-pages/commit/ab371259dd262501f100a0b6fdbe4231200e8938)), closes [#217](https://github.com/peaceiris/actions-gh-pages/issues/217)
* bump ts-jest from 25.2.1 to 25.3.0 (#198) ([e26a05e](https://github.com/peaceiris/actions-gh-pages/commit/e26a05e4739a55410254da8777766f46eab5826a)), closes [#198](https://github.com/peaceiris/actions-gh-pages/issues/198)
* bump ts-jest from 25.3.0 to 25.3.1 (#211) ([d48d5de](https://github.com/peaceiris/actions-gh-pages/commit/d48d5de82e47f8e4fd718b2ec979301a99cb7202)), closes [#211](https://github.com/peaceiris/actions-gh-pages/issues/211)
* npm audit fix ([58be994](https://github.com/peaceiris/actions-gh-pages/commit/58be9948094654ed7853e644e1fe29310c1325f2))
### docs
* Add branches ([596c2d5](https://github.com/peaceiris/actions-gh-pages/commit/596c2d55482b737210a851c25ba572f61685c85e))
* Add fetch-depth 0 ([32a0227](https://github.com/peaceiris/actions-gh-pages/commit/32a0227f7c6301faaa80bd5680eb93e5e049996f))
* Add github_token section ([d59e15b](https://github.com/peaceiris/actions-gh-pages/commit/d59e15bbd09dea2d67fca9947f5526fe0e718b63))
* Add github/personal-website ([e2a54ec](https://github.com/peaceiris/actions-gh-pages/commit/e2a54ec0b920afe6f8108d1b0237cd7963faafc2))
* Add link to example ([c50f9fd](https://github.com/peaceiris/actions-gh-pages/commit/c50f9fd17d0d1d6d24b4c45c4e6e09ea9187536f))
* Add link to interview (#194) ([c276f65](https://github.com/peaceiris/actions-gh-pages/commit/c276f65cf9ffa972e8f2cd4c358120bebb357c3f)), closes [#194](https://github.com/peaceiris/actions-gh-pages/issues/194)
* Add path to workflow file ([1ee7d6e](https://github.com/peaceiris/actions-gh-pages/commit/1ee7d6e98a5634528769f1e28d7982706cf0356c))
* Add Swift Publish example (#228) ([9f90987](https://github.com/peaceiris/actions-gh-pages/commit/9f90987bad7ac98d4f0c2dbad6b95ca3d2471102)), closes [#228](https://github.com/peaceiris/actions-gh-pages/issues/228) [#227](https://github.com/peaceiris/actions-gh-pages/issues/227)
* bump actions/checkout to v2 in Hugo example ([0294e8c](https://github.com/peaceiris/actions-gh-pages/commit/0294e8c526ec496925ffbef19885cc57d2ab0383))
* bump hugo and mdbook ([b6bc504](https://github.com/peaceiris/actions-gh-pages/commit/b6bc5040aafba38af3782d27801d58f2a06ddd6f))
* bump mdbook from 0.3.5 to 0.3.6 ([164addf](https://github.com/peaceiris/actions-gh-pages/commit/164addf07d7d653dd193300a4828d00437c56b65))
* bump node from 10 to 12 (#192) ([9597ab9](https://github.com/peaceiris/actions-gh-pages/commit/9597ab97de490652c80824ee63060736af58c369)), closes [#192](https://github.com/peaceiris/actions-gh-pages/issues/192)
* fix typo ([3e53047](https://github.com/peaceiris/actions-gh-pages/commit/3e53047dc0f67282685d350dd6a0e3342c70d20f))
* Improve Docusaurus example (#191) ([0144209](https://github.com/peaceiris/actions-gh-pages/commit/014420965cfc3721de582be7a7c01ec36b5b1d21)), closes [#191](https://github.com/peaceiris/actions-gh-pages/issues/191)
* Improve Elm example (#190) ([8739981](https://github.com/peaceiris/actions-gh-pages/commit/87399813a5eb5ec3a73d11719066dceff2620582)), closes [#190](https://github.com/peaceiris/actions-gh-pages/issues/190)
* Improve Flutter example (#189) ([2ea85f7](https://github.com/peaceiris/actions-gh-pages/commit/2ea85f732266fec9726a6b32856b338dfe36f056)), closes [#189](https://github.com/peaceiris/actions-gh-pages/issues/189)
* Improve section name of enable_jekyll (#193) ([fbff0cd](https://github.com/peaceiris/actions-gh-pages/commit/fbff0cd1e0680c9ff1a9ffd34306fb2199308eac)), closes [#193](https://github.com/peaceiris/actions-gh-pages/issues/193)
* update ([9614091](https://github.com/peaceiris/actions-gh-pages/commit/9614091a5e44b16c3add28e53671146a91dbfbe4))
* Update Docusaurus workflow example (#229) ([fb15409](https://github.com/peaceiris/actions-gh-pages/commit/fb15409be9a17556fc8c4b2335735466e8b8347b)), closes [#229](https://github.com/peaceiris/actions-gh-pages/issues/229)
* update test badge ([a93c85c](https://github.com/peaceiris/actions-gh-pages/commit/a93c85ca96782d06b7c1f68e0d1bd7d337cf40cb))
### feat
* Set outputs.skip when action skipped ([8019d94](https://github.com/peaceiris/actions-gh-pages/commit/8019d941f376d6f650735a88216bf5baebb7f397)), closes [#165](https://github.com/peaceiris/actions-gh-pages/issues/165)
## [3.5.6](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.5...v3.5.6) (2020-03-16)
### fix
* skip on fork (#159) ([6fa13fe](https://github.com/peaceiris/actions-gh-pages/commit/6fa13fefb393227eec5c9710d92e8bffa917546a)), closes [#159](https://github.com/peaceiris/actions-gh-pages/issues/159)
## [3.5.5](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4...v3.5.5) (2020-03-16)
### chore
* Add new task all ([01fdaf2](https://github.com/peaceiris/actions-gh-pages/commit/01fdaf2f0274401d2403c809b20c37fb7a8535a6))
### fix
* skip on fork if pull_request (#158) ([d6bd618](https://github.com/peaceiris/actions-gh-pages/commit/d6bd6182f264ce695613180743d42e377570bbf4)), closes [#158](https://github.com/peaceiris/actions-gh-pages/issues/158) [#157](https://github.com/peaceiris/actions-gh-pages/issues/157)
## [3.5.4](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.3...v3.5.4) (2020-03-16)
### fix
* skip deployment on forks (#156) ([4f06df8](https://github.com/peaceiris/actions-gh-pages/commit/4f06df820b7a5882e2faef0e6929bb670140fba0)), closes [#156](https://github.com/peaceiris/actions-gh-pages/issues/156) [#153](https://github.com/peaceiris/actions-gh-pages/issues/153)
## [3.5.4-6](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-5...v3.5.4-6) (2020-03-15)
### fix
* skip logic ([44bdada](https://github.com/peaceiris/actions-gh-pages/commit/44bdada02c71f646d23ffefe1ea07d16386dbf83))
## [3.5.4-5](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-4...v3.5.4-5) (2020-03-14)
### fix
* property access ([72f58a0](https://github.com/peaceiris/actions-gh-pages/commit/72f58a06cf5db88d3eb982f57de8dbc266e39232))
## [3.5.4-4](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-3...v3.5.4-4) (2020-03-14)
### test
* skipOnFork() ([6f9a5b7](https://github.com/peaceiris/actions-gh-pages/commit/6f9a5b7a66bbf855cadc34099fa6450c40eff4a2))
## [3.5.4-3](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-2...v3.5.4-3) (2020-03-14)
### fix
* skip logic ([01976c9](https://github.com/peaceiris/actions-gh-pages/commit/01976c9d9b95b42997caa2a85c2d737eb75e852e))
## [3.5.4-2](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-1...v3.5.4-2) (2020-03-14)
### fix
* skip logic ([c97a39a](https://github.com/peaceiris/actions-gh-pages/commit/c97a39a35f681badbf7490c2786eddf06b17316d))
## [3.5.4-1](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-0...v3.5.4-1) (2020-03-14)
### fix
* isForkRepository ([6546aa9](https://github.com/peaceiris/actions-gh-pages/commit/6546aa96085e89bd91adc56f58be665766e93a1e))
## [3.5.4-0](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.3...v3.5.4-0) (2020-03-14)
### fix
* skip on forks ([c320668](https://github.com/peaceiris/actions-gh-pages/commit/c320668126b104ad2c15ea1b583a75cd3978c2f3)), closes [#153](https://github.com/peaceiris/actions-gh-pages/issues/153)
## [3.5.3](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.2...v3.5.3) (2020-03-13)
### deps
* [security] bump acorn from 6.4.0 to 6.4.1 (#155) ([2fa0a59](https://github.com/peaceiris/actions-gh-pages/commit/2fa0a59e21f19c0862ebc505187b3ede95a92561)), closes [#155](https://github.com/peaceiris/actions-gh-pages/issues/155)
* bump @types/node from 12.12.29 to 12.12.30 (#154) ([d1f9877](https://github.com/peaceiris/actions-gh-pages/commit/d1f987783c05614c72b8c5009fbfd941982128ec)), closes [#154](https://github.com/peaceiris/actions-gh-pages/issues/154)
## [3.5.2](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.1...v3.5.2) (2020-03-12)
### chore
* reindent ([b2788ae](https://github.com/peaceiris/actions-gh-pages/commit/b2788ae3c6c463fccde4f9db8abac12cf2f42b72))
### deps
* bump @typescript-eslint/eslint-plugin from 2.22.0 to 2.23.0 (#150) ([7f32718](https://github.com/peaceiris/actions-gh-pages/commit/7f32718f667956be6bab3cd2dffe9559cdd26fc7)), closes [#150](https://github.com/peaceiris/actions-gh-pages/issues/150)
* bump @typescript-eslint/parser from 2.22.0 to 2.23.0 (#149) ([6801987](https://github.com/peaceiris/actions-gh-pages/commit/680198766bcc7c4625ee5c9f599187f99bf0c118)), closes [#149](https://github.com/peaceiris/actions-gh-pages/issues/149)
### fix
* set commit author as local config (#152) ([a1ff787](https://github.com/peaceiris/actions-gh-pages/commit/a1ff787715905a17a17d1ab7b42eba976a4553c6)), closes [#152](https://github.com/peaceiris/actions-gh-pages/issues/152) [#151](https://github.com/peaceiris/actions-gh-pages/issues/151)
## [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)

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.26.2"
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" && \

View File

@@ -4,6 +4,7 @@ IMAGE_NAME := actions_github_pages_dev:latest
NODE_VERSION := $(shell cat ./.nvmrc)
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME)
.PHONY: build
@@ -14,6 +15,10 @@ build:
run:
$(DOCKER_RUN) $(cmd)
.PHONY: cirun
cirun:
$(DOCKER_RUN_CI) $(cmd)
.PHONY: test
test:
$(DOCKER_RUN) npm test
@@ -21,3 +26,11 @@ test:
.PHONY: commit
commit:
$(DOCKER_RUN) git commit -m "$(msg)"
.PHONY: all
all:
$(DOCKER_RUN) npm run all
.PHONY: ciall
ciall:
$(DOCKER_RUN_CI) npm run all

541
README.md
View File

@@ -1,23 +1,22 @@
[![license](https://img.shields.io/github/license/peaceiris/actions-gh-pages.svg)](https://github.com/peaceiris/actions-gh-pages/blob/master/LICENSE)
[![release](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg)](https://github.com/peaceiris/actions-gh-pages/releases/latest)
[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-gh-pages.svg)](https://github.com/peaceiris/actions-gh-pages/releases)
![Test Action](https://github.com/peaceiris/actions-gh-pages/workflows/Test%20Action/badge.svg?branch=master&event=push)
![Test](https://github.com/peaceiris/actions-gh-pages/workflows/Test/badge.svg?branch=master&event=push)
[![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-gh-pages/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-gh-pages)
[![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-gh-pages/releases.atom)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=peaceiris/actions-gh-pages)](https://dependabot.com)
<img width="400" alt="GitHub Actions for deploying to GitHub Pages with Static Site Generators" src="./images/ogp.svg">
> This Action has been migrated to a TypeScript Action (version 3).
>
> The old Docker Action is [peaceiris/actions-gh-pages@v2](https://github.com/peaceiris/actions-gh-pages/tree/v2)
This Action has been migrated to a TypeScript Action (version 3).
The old Docker Action is [peaceiris/actions-gh-pages@v2](https://github.com/peaceiris/actions-gh-pages/tree/v2)
## GitHub Actions for GitHub Pages
This is a **GitHub Action** to deploy your static files to **GitHub Pages**.
This deploy action can be combined simply and freely with [Static Site Generators]. (Hugo, MkDocs, Gatsby, GitBook, mdBook, etc.)
This deploy action can be combined simply and freely with [Static Site Generators]. (Hugo, MkDocs, Gatsby, GitBook, mdBook, and so on.)
[Static Site Generators]: https://www.staticgen.com/
@@ -28,9 +27,7 @@ The next example step will deploy `./public` directory to the remote `gh-pages`
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# github_token: ${{ secrets.GITHUB_TOKEN }}
# personal_token: ${{ secrets.PERSONAL_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
```
@@ -40,19 +37,22 @@ Three tokens are supported.
| Token | Private repo | Public repo | Protocol | Setup |
|---|:---:|:---:|---|---|
| `github_token` | ✅️ | (1) | HTTPS | Unnecessary |
| `personal_token` | ✅️ | ✅️ | HTTPS | Necessary |
| `github_token` | ✅️ | ✅️ | HTTPS | Unnecessary |
| `deploy_key` | ✅️ | ✅️ | SSH | Necessary |
| `personal_token` | ✅️ | ✅️ | HTTPS | Necessary |
1. ~~Currently, GitHub Actions does not support to trigger a GitHub Pages build event using GITHUB_TOKEN on a public repository.~~ Maybe, we can use it but there is no official announcement by GitHub.
Notes: Actually, the `GITHUB_TOKEN` works for deploying to GitHub Pages but it has still some limitations. For the first deployment, we need to select the `gh-pages` branch or `master` branch on the repository settings tab. See [First Deployment with `GITHUB_TOKEN`](#%EF%B8%8F-first-deployment-with-github_token)
### Supported Platforms
| runs-on | `deploy_key` | `github_token` | `personal_token` |
All Actions runners: Linux (Ubuntu), macOS, and Windows are supported.
| runs-on | `github_token` | `deploy_key` | `personal_token` |
|---|:---:|:---:|:---:|
| ubuntu-18.04 | ✅️ | ✅️ | ✅️ |
| ubuntu-16.04 | ✅️ | ✅️ | ✅️ |
| macos-latest | ✅️ | ✅️ | ✅️ |
| windows-latest | (2) | ✅️ | ✅️ |
| windows-latest | ✅️ | (2) | ✅️ |
2. WIP, See [Issue #87](https://github.com/peaceiris/actions-gh-pages/issues/87)
@@ -65,13 +65,16 @@ Three tokens are supported.
- [Getting started](#getting-started)
- [(1) Add SSH deploy key](#1-add-ssh-deploy-key)
- [(2) Create your workflow](#2-create-your-workflow)
- [⭐️ Repository type - Project](#%EF%B8%8F-repository-type---project)
- [⭐️ Repository type - User and Organization](#%EF%B8%8F-repository-type---user-and-organization)
- [⭐️ Repository type - Project](#%EF%B8%8F-repository-type---project)
- [⭐️ Repository type - User and Organization](#%EF%B8%8F-repository-type---user-and-organization)
- [Options](#options)
- [⭐️ `personal_token`](#%EF%B8%8F-personal_token)
- [⭐️ `github_token`](#%EF%B8%8F-github_token)
- [⭐️ `deploy_key`](#%EF%B8%8F-deploy_key)
- [⭐️ `personal_token`](#%EF%B8%8F-personal_token)
- [⭐️ `publish_branch`](#%EF%B8%8F-publish_branch)
- [⭐️ `publish_dir`](#%EF%B8%8F-publish_dir)
- [⭐️ CNAME](#%EF%B8%8F-cname)
- [⭐️ Enable Built-in Jekyll](#%EF%B8%8F-enable-built-in-jekyll)
- [⭐️ Allow empty commits](#%EF%B8%8F-allow-empty-commits)
- [⭐️ Keeping existing files](#%EF%B8%8F-keeping-existing-files)
- [⭐️ Deploy to external repository](#%EF%B8%8F-deploy-to-external-repository)
@@ -80,18 +83,21 @@ Three tokens are supported.
- [⭐️ Set custom commit message](#%EF%B8%8F-set-custom-commit-message)
- [⭐️ Create Git tag](#%EF%B8%8F-create-git-tag)
- [Tips and FAQ](#tips-and-faq)
- [⭐️ Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key)
- [⭐️ First Deployment with `GITHUB_TOKEN`](#%EF%B8%8F-first-deployment-with-github_token)
- [⭐️ Use the latest and specific release](#%EF%B8%8F-use-the-latest-and-specific-release)
- [⭐️ How to add `CNAME`](#%EF%B8%8F-how-to-add-cname)
- [⭐️ Deployment completed but you cannot read](#%EF%B8%8F-deployment-completed-but-you-cannot-read)
- [Examples](#examples)
- [⭐️ Static Site Generators with Node.js](#%EF%B8%8F-static-site-generators-with-nodejs)
- [⭐️ Gatsby](#%EF%B8%8F-gatsby)
- [⭐️ React and Next](#%EF%B8%8F-react-and-next)
- [⭐️ Vue and Nuxt](#%EF%B8%8F-vue-and-nuxt)
- [⭐️ Docusaurus](#%EF%B8%8F-docusaurus)
- [⭐️ Static Site Generators with Python](#%EF%B8%8F-static-site-generators-with-python)
- [⭐️ mdBook (Rust)](#%EF%B8%8F-mdbook-rust)
- [⭐️ Flutter Web](#%EF%B8%8F-flutter-web)
- [⭐️ Elm](#%EF%B8%8F-elm)
- [⭐️ github/personal-website](#%EF%B8%8F-githubpersonal-website)
- [⭐️ Swift Publish](#%EF%B8%8F-swift-publish)
- [License](#license)
- [Maintainer](#maintainer)
@@ -101,35 +107,9 @@ Three tokens are supported.
## Getting started
### (1) Add SSH deploy key
### ⭐️ Repository type - Project
Generate your deploy key with the following command.
```sh
ssh-keygen -t rsa -b 4096 -C "$(git config user.email)" -f gh-pages -N ""
# You will get 2 files:
# gh-pages.pub (public key)
# gh-pages (private key)
```
Next, Go to **Repository Settings**
- Go to **Deploy Keys** and add your public key with the **Allow write access**
- Go to **Secrets** and add your private key as `ACTIONS_DEPLOY_KEY`
| Add your public key | Success |
|---|---|
| ![](./images/deploy-keys-1.jpg) | ![](./images/deploy-keys-2.jpg) |
| Add your private key | Success |
|---|---|
| ![](./images/secrets-1.jpg) | ![](./images/secrets-2.jpg) |
### (2) Create your workflow
Add your workflow setting YAML file `.github/workflows/gh-pages.yml` and push to the default branch.
#### ⭐️ Repository type - Project
Add your workflow file `.github/workflows/gh-pages.yml` and push to the remote master branch.
An example workflow for Hugo.
@@ -137,9 +117,6 @@ An example workflow for Hugo.
[![peaceiris/actions-hugo - GitHub](https://gh-card.dev/repos/peaceiris/actions-hugo.svg?fullname)](https://github.com/peaceiris/actions-hugo)
![peaceiris/actions-hugo latest version](https://img.shields.io/github/release/peaceiris/actions-hugo.svg?label=peaceiris%2Factions-hugo)
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
```yaml
name: github pages
@@ -152,14 +129,15 @@ jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
# with:
# submodules: true
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.64.0'
hugo-version: '0.68.3'
- name: Build
run: hugo --minify
@@ -167,21 +145,17 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
```
The above example is for [Project Pages sites]. (`<username>/<project_name>` repository)
| Actions log overview | Build step log |
| Actions log overview | GitHub Pages log |
|---|---|
| ![](./images/log1.jpg) | ![](./images/log2.jpg) |
| ![](./images/log_overview.jpg) | ![](./images/log_success.jpg) |
| Deploy step log | GitHub Pages log |
|---|---|
| ![](./images/log3.jpg) | ![](./images/log4.jpg) |
#### ⭐️ Repository type - User and Organization
### ⭐️ Repository type - User and Organization
For [User and Organization Pages sites] (`<username>/<username>.github.io` repository),
we have to set `master` branch to `publish_branch`.
@@ -205,7 +179,7 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: master # deploying branch
```
@@ -224,28 +198,108 @@ jobs:
## Options
### ⭐️ `github_token`
**This option is for `GITHUB_TOKEN`, not a personal access token.**
GitHub Actions runner automatically creates a `GITHUB_TOKEN` secret to use in your workflow. You can use the `GITHUB_TOKEN` to authenticate in a workflow run.
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
```
For more details about `GITHUB_TOKEN`: [Authenticating with the GITHUB_TOKEN - GitHub Help](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)
### ⭐️ `deploy_key`
Read [Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key), create your SSH deploy key, and set the `deploy_key` option like the following.
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./public
```
### ⭐️ `personal_token`
[Generate a personal access token (`repo`)](https://github.com/settings/tokens) and add it to Secrets as `PERSONAL_TOKEN`, it works as well as `ACTIONS_DEPLOY_KEY`.
```diff
- deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
+ personal_token: ${{ secrets.PERSONAL_TOKEN }}
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./public
```
### ⭐️ `github_token`
### ⭐️ `publish_branch`
> ⚠️ **NOTES**: `github_token` works only on a **private** repository.
>
> This action supports `GITHUB_TOKEN` but it has some problems to deploy to GitHub Pages. GitHub team is investigating that. See [Issue #9]
A target branch to deploy to GitHub Pages. The default is `gh-pages`.
[Issue #9]: https://github.com/peaceiris/actions-gh-pages/issues/9
```diff
- deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
+ github_token: ${{ secrets.GITHUB_TOKEN }}
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: master # default: gh-pages
```
### ⭐️ `publish_dir`
A target directory to deploy to GitHub Pages. The default is `public`.
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out # default: public
```
### ⭐️ CNAME
To add `CNAME` file, we can set the `cname` option.
For more details about `CNAME`, read the official documentation: [Managing a custom domain for your GitHub Pages site - GitHub Help](https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site)
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: github.com
```
### ⭐️ Enable Built-in Jekyll
If you want GitHub Pages to process your site with the static site generator Jekyll, set `enable_jekyll` to true.
[github/personal-website](https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-githubpersonal-website) is one of the examples using GitHub Pages built-in Jekyll.
By default, this action signals to GitHub Pages that the site shall not be processed with Jekyll. This is done by adding an empty `.nojekyll` file when publishing to the master or gh-pages branch. When a `.nojekyll` file already exists, this action does nothing.
Bypassing Jekyll makes the deployment faster and is necessary if you are deploying files or directories that start with underscores, since Jekyll considers these to be special resources and does not copy them to the final site. You only need to set `enable_jekyll` to true when you want to deploy a Jekyll-powered website and let GitHub Pages do the Jekyll processing.
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
enable_jekyll: true
```
For more details about `.nojekyll`: [Bypassing Jekyll on GitHub Pages - The GitHub Blog](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/)
### ⭐️ Allow empty commits
By default, a commit will not be generated when no file changes. If you want to allow an empty commit, set the optional parameter `allow_empty_commit` to `true`.
@@ -256,7 +310,7 @@ For example:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
allow_empty_commit: true
```
@@ -271,7 +325,7 @@ For example:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
keep_files: true
```
@@ -289,7 +343,7 @@ For example:
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: username/external-repository
publish_branch: gh-pages
publish_branch: master
publish_dir: ./public
```
@@ -307,7 +361,7 @@ This allows you to make your publish branch with only the latest commit.
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true
```
@@ -321,26 +375,42 @@ A commit is always created with the same user.
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
user_name: iris
user_email: iris@peaceiris.com
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
```
<img width="400px" alt="Add GitHub Actions bot as a committer" src="./images/committer_github_actions_bot.jpg">
### ⭐️ Set custom commit message
Set custom commit message.
Set a custom commit message.
When we create a commit with a message `docs: Update some post`, a deployment commit will be generated with a message `docs: Update some post ${GITHUB_SHA}`.
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
commit_message: ${{ github.event.head_commit.message }}
```
![Set a custom commit message - GitHub Actions for GitHub Pages](./images/commit_message.jpg)
To set a full custom commit message without a triggered commit hash,
use the `full_commit_message` option instead of the `commit_message` option.
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
full_commit_message: ${{ github.event.head_commit.message }}
```
### ⭐️ Create Git tag
Here is an example workflow.
@@ -374,7 +444,7 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
@@ -402,6 +472,42 @@ v1.2.3 # Tag on the master branch
## Tips and FAQ
### ⭐️ Create SSH Deploy Key
Generate your deploy key with the following command.
```sh
ssh-keygen -t rsa -b 4096 -C "$(git config user.email)" -f gh-pages -N ""
# You will get 2 files:
# gh-pages.pub (public key)
# gh-pages (private key)
```
Next, Go to **Repository Settings**
- Go to **Deploy Keys** and add your public key with the **Allow write access**
- Go to **Secrets** and add your private key as `ACTIONS_DEPLOY_KEY`
| Add your public key | Success |
|---|---|
| ![](./images/deploy-keys-1.jpg) | ![](./images/deploy-keys-2.jpg) |
| Add your private key | Success |
|---|---|
| ![](./images/secrets-1.jpg) | ![](./images/secrets-2.jpg) |
### ⭐️ First Deployment with `GITHUB_TOKEN`
The `GITHUB_TOKEN` has limitations for the first deployment so we have to select the GitHub Pages branch on the repository settings tab. After that, do the second deployment like the following pictures.
| First deployment failed | Go to the settings tab |
|---|---|
| ![](./images/log_first_deployment_failed_with_github_token.jpg) | ![](./images/settings_inactive.jpg) |
| Select branch | Deploying again and succeed |
|---|---|
| ![](./images/settings_select.jpg) | ![](./images/log_success.jpg) |
### ⭐️ Use the latest and specific release
We recommend you to use the latest and specific release of this action for stable CI/CD.
@@ -409,47 +515,6 @@ It is useful to watch this repository (release only) to check the [latest releas
[latest release]: https://github.com/peaceiris/actions-gh-pages/releases
### ⭐️ How to add `CNAME`
Most of the Static Site Generators support `CNAME` as a static file.
- [Use a Custom Domain | Hugo](https://gohugo.io/hosting-and-deployment/hosting-on-github/#use-a-custom-domain)
- [Using the Static folder | GatsbyJS](https://www.gatsbyjs.org/docs/static-folder/)
The same may be said of other files (`.nojekyll`, `BingSiteAuth.xml`, `robots.txt`, etc.). It is better to manage those files by Static Site Generators.
Does not your static site generator deal with the static files? No problem, you can add the file like the following.
```yaml
- name: Build
run: |
buildcommand
cp ./path/to/CNAME ./public/CNAME
- name: Deploy
```
### ⭐️ Deployment completed but you cannot read
Does your `publish_dir` contain files or directories that name starts with an underscore? (`_modules`, `_sources` and `_next`, etc.)
GitHub Pages does not read those by default.
Please add `.nojekyll` file to `publish_dir`.
- [Bypassing Jekyll on GitHub Pages - The GitHub Blog](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/)
> It is now possible to completely bypass Jekyll processing on GitHub Pages by creating a file named `.nojekyll` in the root of your pages repo and pushing it to GitHub. This should only be necessary if your site uses files or directories that start with underscores since Jekyll considers these to be special resources and does not copy them to the final site.
Does not your static site generator deal with the static files? No problem, you can add the file like the following.
```yaml
- name: Build
run: |
buildcommand
touch ./public/.nojekyll
- name: Deploy
```
<div align="right">
<a href="#table-of-contents">Back to TOC ☝️</a>
</div>
@@ -460,7 +525,7 @@ Does not your static site generator deal with the static files? No problem, you
### ⭐️ Static Site Generators with Node.js
[hexo], [gitbook], [vuepress], [react-static], [gridsome], etc.
[hexo], [gitbook], [vuepress], [react-static], [gridsome], and so on.
[hexo]: https://github.com/hexojs/hexo
[gitbook]: https://github.com/GitbookIO/gitbook
@@ -470,8 +535,6 @@ Does not your static site generator deal with the static files? No problem, you
Premise: Dependencies are managed by `package.json` and `package-lock.json`
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
```yaml
name: github pages
@@ -489,7 +552,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'
- name: Cache dependencies
uses: actions/cache@v1
@@ -500,13 +563,12 @@ jobs:
${{ runner.os }}-node-
- run: npm ci
- run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
```
@@ -517,8 +579,6 @@ An example for [Gatsby] (Gatsby.js) project with [gatsby-starter-blog]
[Gatsby]: https://github.com/gatsbyjs/gatsby
[gatsby-starter-blog]: https://github.com/gatsbyjs/gatsby-starter-blog
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
```yaml
name: github pages
@@ -536,7 +596,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'
- name: Cache dependencies
uses: actions/cache@v1
@@ -547,17 +607,14 @@ jobs:
${{ runner.os }}-node-
- run: npm ci
- run: npm run format
- run: npm run test
- run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
```
@@ -570,8 +627,6 @@ An example for [Next.js] (React.js) project with [create-next-app]
[Next.js]: https://github.com/zeit/next.js
[create-next-app]: https://nextjs.org/docs
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
```yaml
name: github pages
@@ -589,7 +644,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'
- name: Get yarn cache
id: yarn-cache
@@ -604,17 +659,13 @@ jobs:
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn build
- run: yarn export
- run: touch ./out/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
```
@@ -627,8 +678,6 @@ An example for [Nuxt.js] (Vue.js) project with [create-nuxt-app]
[Nuxt.js]: https://github.com/nuxt/nuxt.js
[create-nuxt-app]: https://github.com/nuxt/create-nuxt-app
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
```yaml
name: github pages
@@ -646,7 +695,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'
- name: Cache dependencies
uses: actions/cache@v1
@@ -657,21 +706,74 @@ jobs:
${{ runner.os }}-node-
- run: npm ci
- run: npm test
- run: npm run generate
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
```
### ⭐️ Docusaurus
An example workflow for [Docusaurus](https://docusaurus.io/).
`npx @docusaurus/init@next init website classic` is useful to create a new Docusaurus project.
```yaml
# .github/workflows/deploy.yml
name: github pages
on:
push:
branches:
- master
paths:
- '.github/workflows/deploy.yml'
- 'website/**'
jobs:
deploy:
runs-on: ubuntu-18.04
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-website-
- run: yarn install
- run: yarn build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
```
### ⭐️ Static Site Generators with Python
[pelican], [MkDocs], [sphinx], etc.
[pelican], [MkDocs], [sphinx], and so on.
[pelican]: https://github.com/getpelican/pelican
[MkDocs]: https://github.com/mkdocs/mkdocs
@@ -679,8 +781,6 @@ jobs:
Premise: Dependencies are managed by `requirements.txt`
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
```yaml
name: github pages
@@ -696,30 +796,36 @@ jobs:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: '3.6'
architecture: 'x64'
python-version: '3.8'
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r ./requirements.txt
run: python3 -m pip install -r ./requirements.txt
- run: mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
```
@@ -748,7 +854,7 @@ jobs:
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.5'
mdbook-version: '0.3.7'
# mdbook-version: 'latest'
- run: mdbook build
@@ -756,21 +862,15 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
```
### ⭐️ Flutter Web
An exapmle workflow for [Flutter web project].
Setup [Flutter] with [subosito/flutter-action].
[peanut | Dart Package] is also useful.
[Flutter]: https://github.com/flutter/flutter
[Flutter web project]: https://flutter.dev/docs/get-started/web
[subosito/flutter-action]: https://github.com/subosito/flutter-action
[peanut | Dart Package]: https://pub.dev/packages/peanut
```yaml
name: github pages
@@ -787,9 +887,9 @@ jobs:
- uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: 'beta'
run: |
git clone https://github.com/flutter/flutter.git --depth 1 -b beta _flutter
echo "::add-path::${GITHUB_WORKSPACE}/_flutter/bin"
- name: Install
run: |
@@ -802,16 +902,15 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/web
```
### ⭐️ Elm
An exapmle workflow for [Elm] with [justgook/setup-elm].
An exapmle workflow for [Elm].
[Elm]: https://elm-lang.org
[justgook/setup-elm]: https://github.com/justgook/setup-elm
```yaml
name: github pages
@@ -827,8 +926,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Setup Elm
uses: justgook/setup-elm@v1
run: npm install elm --global
- name: Make
run: elm make --optimize src/Main.elm
@@ -843,10 +947,84 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
```
### ⭐️ github/personal-website
- [github/personal-website](https://github.com/github/personal-website) - Code that'll help you kickstart a personal website that showcases your work as a software developer.
```yaml
# .github/workflows/github-pages.yml
name: GitHub Pages
on:
push:
branches:
- master
schedule:
- cron: '24 */24 * * *' # Once a day
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
allow_empty_commit: true
enable_jekyll: true
cname: github.peaceiris.com
```
### ⭐️ Swift Publish
An example workflow for [JohnSundell/Publish].
[JohnSundell/Publish]: https://github.com/JohnSundell/Publish
```yaml
name: GitHub Pages
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup JohnSundell/Publish
run: |
cd ${HOME}
git clone --depth=1 https://github.com/JohnSundell/Publish.git
cd ./Publish
swift build -c release
echo "::add-path::${HOME}/Publish/.build/release"
- run: publish-cli generate
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./Output
```
<div align="right">
<a href="#table-of-contents">Back to TOC ☝️</a>
</div>
## License
- [MIT License - peaceiris/actions-gh-pages]
@@ -858,6 +1036,7 @@ jobs:
## Maintainer
- [peaceiris homepage](https://peaceiris.com/)
- [GitHub Action Hero: Shohei Ueda - The GitHub Blog](https://github.blog/2020-03-22-github-action-hero-shohei-ueda/)

View File

@@ -1,44 +1,108 @@
// 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] FullCommitMessage: ${inps.FullCommitMessage}
[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();
@@ -54,8 +118,11 @@ describe('getInputs()', () => {
expect(inps.UserName).toMatch('');
expect(inps.UserEmail).toMatch('');
expect(inps.CommitMessage).toMatch('');
expect(inps.FullCommitMessage).toMatch('');
expect(inps.TagName).toMatch('');
expect(inps.TagMessage).toMatch('');
expect(inps.DisableNoJekyll).toBe(false);
expect(inps.CNAME).toMatch('');
});
test('get spec inputs', () => {
@@ -71,8 +138,11 @@ describe('getInputs()', () => {
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_FULL_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();
@@ -88,7 +158,26 @@ describe('getInputs()', () => {
expect(inps.UserName).toMatch('username');
expect(inps.UserEmail).toMatch('github@github.com');
expect(inps.CommitMessage).toMatch('feat: Add new feature');
expect(inps.FullCommitMessage).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('get spec inputs enable_jekyll', () => {
process.env['INPUT_ENABLE_JEKYLL'] = 'true';
const inps: Inputs = getInputs();
expect(inps.DisableNoJekyll).toBe(true);
});
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');
});
});

183
__tests__/git-utils.test.ts Normal file
View File

@@ -0,0 +1,183 @@
import {
getUserName,
getUserEmail,
setCommitAuthor,
getCommitMessage
} from '../src/git-utils';
import {getWorkDirName, createWorkDir} from '../src/utils';
import {CmdResult} from '../src/interfaces';
import * as exec from '@actions/exec';
beforeEach(() => {
jest.resetModules();
process.env['GITHUB_ACTOR'] = 'default-octocat';
process.env['GITHUB_REPOSITORY'] = 'owner/repo';
});
afterEach(() => {
delete process.env['GITHUB_ACTOR'];
delete process.env['GITHUB_REPOSITORY'];
});
describe('getUserName()', () => {
test('get default git user name', () => {
const userName = '';
const test = getUserName(userName);
expect(test).toMatch('default-octocat');
});
test('get custom git user name', () => {
const userName = 'custom-octocat';
const test = getUserName(userName);
expect(test).toMatch(userName);
});
});
describe('getUserEmail()', () => {
test('get default git user email', () => {
const userEmail = '';
const test = getUserEmail(userEmail);
expect(test).toMatch('default-octocat@users.noreply.github.com');
});
test('get custom git user email', () => {
const userEmail = 'custom-octocat@github.com';
const test = getUserEmail(userEmail);
expect(test).toMatch(userEmail);
});
});
describe('setCommitAuthor()', () => {
let workDirName = '';
(async (): Promise<void> => {
const date = new Date();
const unixTime = date.getTime();
workDirName = await getWorkDirName(`${unixTime}`);
})();
beforeEach(async () => {
await createWorkDir(workDirName);
process.chdir(workDirName);
await exec.exec('git', ['init']);
});
test('get default commit author', async () => {
const userName = '';
const userEmail = '';
const result: CmdResult = {
exitcode: 0,
output: ''
};
const options = {
listeners: {
stdout: (data: Buffer): void => {
result.output += data.toString();
}
}
};
await setCommitAuthor(userName, userEmail);
result.exitcode = await exec.exec('git', ['config', 'user.name'], options);
expect(result.output).toMatch('default-octocat');
result.exitcode = await exec.exec('git', ['config', 'user.email'], options);
expect(result.output).toMatch('default-octocat@users.noreply.github.com');
});
test('get custom commit author', async () => {
const userName = 'custom-octocat';
const userEmail = 'custom-octocat@github.com';
const result: CmdResult = {
exitcode: 0,
output: ''
};
const options = {
listeners: {
stdout: (data: Buffer): void => {
result.output += data.toString();
}
}
};
await setCommitAuthor(userName, userEmail);
result.exitcode = await exec.exec('git', ['config', 'user.name'], options);
expect(result.output).toMatch(userName);
result.exitcode = await exec.exec('git', ['config', 'user.email'], options);
expect(result.output).toMatch(userEmail);
});
test('throw error user_email is undefined', async () => {
const userName = 'custom-octocat';
const userEmail = '';
await expect(setCommitAuthor(userName, userEmail)).rejects.toThrowError(
'user_email is undefined'
);
});
test('throw error user_name is undefined', async () => {
const userName = '';
const userEmail = 'custom-octocat@github.com';
await expect(setCommitAuthor(userName, userEmail)).rejects.toThrowError(
'user_name is undefined'
);
});
});
describe('getCommitMessage()', () => {
test('get default message', () => {
const test = getCommitMessage('', '', '', 'actions/pages', 'commit_hash');
expect(test).toMatch('deploy: commit_hash');
});
test('get default message for external repository', () => {
const test = getCommitMessage(
'',
'',
'actions/actions.github.io',
'actions/pages',
'commit_hash'
);
expect(test).toMatch('deploy: actions/pages@commit_hash');
});
test('get custom message', () => {
const test = getCommitMessage(
'Custom msg',
'',
'',
'actions/pages',
'commit_hash'
);
expect(test).toMatch('Custom msg commit_hash');
});
test('get custom message for external repository', () => {
const test = getCommitMessage(
'Custom msg',
'',
'actions/actions.github.io',
'actions/pages',
'commit_hash'
);
expect(test).toMatch('Custom msg actions/pages@commit_hash');
});
test('get full custom message', () => {
const test = getCommitMessage(
'',
'Full custom msg',
'',
'actions/pages',
'commit_hash'
);
expect(test).toMatch('Full custom msg');
});
test('get full custom message for external repository', () => {
const test = getCommitMessage(
'',
'Full custom msg',
'actions/actions.github.io',
'actions/pages',
'commit_hash'
);
expect(test).toMatch('Full custom msg');
});
});

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);
});
});

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

@@ -0,0 +1,233 @@
import path from 'path';
import fs from 'fs';
import {
getHomeDir,
getWorkDirName,
createWorkDir,
addNoJekyll,
addCNAME,
skipOnFork
} 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);
});
});
describe('skipOnFork()', () => {
test('return false on upstream', async () => {
const test = await skipOnFork(false, 'token', '', '');
expect(test).toBeFalsy();
});
test('return false on fork with github_token', async () => {
const test = await skipOnFork(true, 'token', '', '');
expect(test).toBeFalsy();
});
test('return false on fork with deploy_key', async () => {
const test = await skipOnFork(true, '', 'deploy_key', '');
expect(test).toBeFalsy();
});
test('return false on fork with personal_token', async () => {
const test = await skipOnFork(true, '', '', 'personal_token');
expect(test).toBeFalsy();
});
test('return true on fork with no tokens', async () => {
const test = await skipOnFork(true, '', '', '');
expect(test).toBeTruthy();
});
});

View File

@@ -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'
@@ -47,7 +47,10 @@ inputs:
description: 'Set Git user.email'
required: false
commit_message:
description: 'Set custom commit message'
description: 'Set a custom commit message with a triggered commit hash'
required: false
full_commit_message:
description: 'Set a custom full commit message without a triggered commit hash'
required: false
tag_name:
description: 'Set tag name'
@@ -55,3 +58,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

BIN
images/commit_message.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 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

26862
lib/index.js

File diff suppressed because one or more lines are too long

2941
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,18 @@
{
"name": "actions-github-pages",
"version": "3.1.0",
"version": "3.6.1",
"description": "GitHub Actions for GitHub Pages",
"main": "lib/index.js",
"engines": {
"node": ">=12.14.1",
"npm": ">=6.13.7"
"node": ">=12.16.3",
"npm": ">=6.14.4"
},
"scripts": {
"all": "npm run format && npm run lint && npm test",
"lint": "eslint ./{src,__tests__}/**/*.ts",
"lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts",
"test": "jest --coverage --verbose --detectOpenHandles",
"build": "ncc build ./src/index.ts -o lib",
"build": "ncc build ./src/index.ts -o lib --minify",
"tsc": "tsc",
"format": "prettier --write **/*.ts",
"format:check": "prettier --check **/*.ts",
@@ -29,6 +30,9 @@
"src/**/*.ts": [
"prettier --check",
"eslint"
],
"README.md": [
"npx doctoc@1.4.0 --github"
]
},
"repository": {
@@ -50,26 +54,28 @@
},
"homepage": "https://github.com/peaceiris/actions-gh-pages#readme",
"dependencies": {
"@actions/core": "^1.2.2",
"@actions/exec": "^1.0.3",
"@actions/github": "^2.1.0",
"@actions/core": "^1.2.4",
"@actions/exec": "^1.0.4",
"@actions/github": "^2.1.1",
"@actions/io": "^1.0.2"
},
"devDependencies": {
"@types/jest": "^25.1.2",
"@types/jest": "^25.2.1",
"@types/js-yaml": "^3.12.3",
"@types/node": "~12",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.20.0",
"@zeit/ncc": "^0.21.0",
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"@zeit/ncc": "^0.22.1",
"eslint": "^6.8.0",
"eslint-plugin-jest": "^23.7.0",
"husky": "^4.2.3",
"jest": "^25.1.0",
"jest-circus": "^25.1.0",
"lint-staged": "^10.0.7",
"prettier": "1.19.1",
"eslint-plugin-jest": "^23.8.2",
"husky": "^4.2.5",
"jest": "^25.5.4",
"jest-circus": "^25.5.4",
"js-yaml": "^3.13.1",
"lint-staged": "^10.2.2",
"prettier": "2.0.5",
"standard-version": "^7.1.0",
"ts-jest": "^25.2.0",
"typescript": "^3.7.5"
"ts-jest": "^25.4.0",
"typescript": "^3.8.3"
}
}

View File

@@ -1,29 +1,51 @@
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] UserName: ${inps.UserName}`);
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] FullCommitMessage: ${inps.FullCommitMessage}
[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'),
@@ -40,11 +62,12 @@ export function getInputs(): Inputs {
UserName: core.getInput('user_name'),
UserEmail: core.getInput('user_email'),
CommitMessage: core.getInput('commit_message'),
FullCommitMessage: core.getInput('full_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

@@ -1,17 +1,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 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']);
@@ -41,9 +34,8 @@ export async function copyAssets(
export async function setRepo(
inps: Inputs,
remoteURL: string,
unixTime: string
workDir: string
): Promise<void> {
const workDir = path.join(getHomeDir(), `actions_github_pages_${unixTime}`);
const publishDir = path.join(
`${process.env.GITHUB_WORKSPACE}`,
inps.PublishDir
@@ -101,7 +93,7 @@ export async function setRepo(
core.info(
`[INFO] first deployment, create new branch ${inps.PublishBranch}`
);
core.info(e);
core.info(e.message);
await createWorkDir(workDir);
process.chdir(workDir);
await createBranchForce(inps.PublishBranch);
@@ -110,51 +102,68 @@ export async function setRepo(
}
}
export async function setConfig(
export function getUserName(userName: string): string {
if (userName) {
return userName;
} else {
return `${process.env.GITHUB_ACTOR}`;
}
}
export function getUserEmail(userEmail: string): string {
if (userEmail) {
return userEmail;
} else {
return `${process.env.GITHUB_ACTOR}@users.noreply.github.com`;
}
}
export async function setCommitAuthor(
userName: string,
userEmail: string
): Promise<void> {
await exec.exec('git', ['config', '--global', 'gc.auto', '0']);
let name = '';
if (userName) {
name = userName;
} else {
name = `${process.env.GITHUB_ACTOR}`;
if (userName && !userEmail) {
throw new Error('user_email is undefined');
}
await exec.exec('git', ['config', '--global', 'user.name', name]);
let email = '';
if (userName !== '' && userEmail !== '') {
email = userEmail;
} else {
email = `${process.env.GITHUB_ACTOR}@users.noreply.github.com`;
if (!userName && userEmail) {
throw new Error('user_name is undefined');
}
await exec.exec('git', ['config', '--global', 'user.email', email]);
await exec.exec('git', ['config', 'user.name', getUserName(userName)]);
await exec.exec('git', ['config', 'user.email', getUserEmail(userEmail)]);
}
return;
export function getCommitMessage(
msg: string,
fullMsg: string,
extRepo: string,
baseRepo: string,
hash: string
): string {
const msgHash = ((): string => {
if (extRepo) {
return `${baseRepo}@${hash}`;
} else {
return hash;
}
})();
const subject = ((): string => {
if (fullMsg) {
return fullMsg;
} else if (msg) {
return `${msg} ${msgHash}`;
} else {
return `deploy: ${msgHash}`;
}
})();
return subject;
}
export async function commit(
allowEmptyCommit: boolean,
externalRepository: string,
message: string
msg: string
): Promise<void> {
let msg = '';
if (message) {
msg = message;
} else {
msg = 'deploy:';
}
const hash = `${process.env.GITHUB_SHA}`;
const baseRepo = `${github.context.repo.owner}/${github.context.repo.repo}`;
if (externalRepository) {
msg = `${msg} ${baseRepo}@${hash}`;
} else {
msg = `${msg} ${hash}`;
}
try {
if (allowEmptyCommit) {
await exec.exec('git', ['commit', '--allow-empty', '-m', `${msg}`]);
@@ -163,7 +172,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

@@ -11,8 +11,11 @@ export interface Inputs {
readonly UserName: string;
readonly UserEmail: string;
readonly CommitMessage: string;
readonly FullCommitMessage: string;
readonly TagName: string;
readonly TagMessage: string;
readonly DisableNoJekyll: boolean;
readonly CNAME: string;
}
export interface CmdResult {

View File

@@ -1,43 +1,99 @@
import {context} from '@actions/github';
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as github from '@actions/github';
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 {
setRepo,
setCommitAuthor,
getCommitMessage,
commit,
push,
pushTag
} from './git-utils';
import {getWorkDirName, addNoJekyll, addCNAME, skipOnFork} from './utils';
export async function run(): Promise<void> {
try {
const inps: Inputs = getInputs();
core.startGroup('Dump inputs');
showInputs(inps);
core.endGroup();
await git.setConfig(inps.UserName, inps.UserEmail);
if (core.isDebug()) {
core.startGroup('Debug: dump context');
console.log(context);
core.endGroup();
}
const eventName = context.eventName;
if (eventName === 'pull_request' || eventName === 'push') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const isForkRepository = (context.payload as any).repository.fork;
const isSkipOnFork = await skipOnFork(
isForkRepository,
inps.GithubToken,
inps.DeployKey,
inps.PersonalToken
);
if (isSkipOnFork) {
core.warning(
'This action runs on a fork and not found auth token, Skip deployment'
);
core.setOutput('skip', 'true');
return;
}
}
core.startGroup('Setup auth token');
const remoteURL = await setTokens(inps);
core.debug(`[INFO] remoteURL: ${remoteURL}`);
core.debug(`remoteURL: ${remoteURL}`);
core.endGroup();
core.startGroup('Prepare publishing assets');
const date = new Date();
const unixTime = date.getTime();
await git.setRepo(inps, remoteURL, `${unixTime}`);
const workDir = await getWorkDirName(`${unixTime}`);
await setRepo(inps, remoteURL, workDir);
await addNoJekyll(workDir, inps.DisableNoJekyll, inps.PublishBranch);
await addCNAME(workDir, inps.CNAME);
core.endGroup();
core.startGroup('Setup Git config');
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']);
await setCommitAuthor(inps.UserName, inps.UserEmail);
core.endGroup();
await git.commit(
inps.AllowEmptyCommit,
core.startGroup('Create a commit');
const hash = `${process.env.GITHUB_SHA}`;
const baseRepo = `${github.context.repo.owner}/${github.context.repo.repo}`;
const commitMessage = getCommitMessage(
inps.CommitMessage,
inps.FullCommitMessage,
inps.ExternalRepository,
inps.CommitMessage
baseRepo,
hash
);
await git.push(inps.PublishBranch, inps.ForceOrphan);
await git.pushTag(inps.TagName, inps.TagMessage);
await commit(inps.AllowEmptyCommit, commitMessage);
core.endGroup();
core.startGroup('Push the commit or tag');
await push(inps.PublishBranch, inps.ForceOrphan);
await pushTag(inps.TagName, inps.TagMessage);
core.endGroup();
core.info('[INFO] Action successfully completed');
return;
} catch (e) {
throw new Error(e);
throw new Error(e.message);
}
}

View File

@@ -9,20 +9,13 @@ const cpexec = require('child_process').execFileSync;
import {Inputs} from './interfaces';
import {getHomeDir} from './utils';
export function setPublishRepo(insp: Inputs): string {
if (insp.ExternalRepository) {
return insp.ExternalRepository;
}
return `${github.context.repo.owner}/${github.context.repo.repo}`;
}
export async function setSSHKey(
inps: Inputs,
publishRepo: string
): Promise<string> {
core.info('[INFO] setup SSH deploy key');
const homeDir = getHomeDir();
const homeDir = await getHomeDir();
const sshDir = path.join(homeDir, '.ssh');
await io.mkdirP(sshDir);
await exec.exec('chmod', ['700', sshDir]);
@@ -66,65 +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}`);
}
}
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,64 @@ 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}`);
}
export async function skipOnFork(
isForkRepository: boolean,
githubToken: string,
deployKey: string,
personalToken: string
): Promise<boolean> {
if (isForkRepository) {
if (githubToken === '' && deployKey === '' && personalToken === '') {
return true;
}
}
return false;
}