mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 20:32:19 +01:00
Compare commits
95 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e89aa66d0 | ||
|
|
8286aeefb8 | ||
|
|
88b26abfee | ||
|
|
cd215c4ce4 | ||
|
|
d13e210741 | ||
|
|
18a809e6c9 | ||
|
|
4245d14847 | ||
|
|
33a289a0d5 | ||
|
|
01cbeb899c | ||
|
|
267b3f1c66 | ||
|
|
3317f5e6cd | ||
|
|
5e135f617c | ||
|
|
3c588690f5 | ||
|
|
fe1c07bf27 | ||
|
|
873c0ab6ca | ||
|
|
e091c924f2 | ||
|
|
22a55848e8 | ||
|
|
802b595093 | ||
|
|
3120b3dd8c | ||
|
|
f0e838658f | ||
|
|
4b04428f53 | ||
|
|
79ed21ee9b | ||
|
|
4c60b233f2 | ||
|
|
bcbb69dfa4 | ||
|
|
4e17872cd1 | ||
|
|
b59871c37d | ||
|
|
e7fbc0b5da | ||
|
|
6b131935e4 | ||
|
|
5825c9307b | ||
|
|
5b3d1ee007 | ||
|
|
5a94243d05 | ||
|
|
b0f29e7ede | ||
|
|
b94c20b65d | ||
|
|
71168fab79 | ||
|
|
caf4dd6aae | ||
|
|
aba4ae3195 | ||
|
|
e0b4d029a2 | ||
|
|
c230bfdf99 | ||
|
|
6ec44a7303 | ||
|
|
444111b78c | ||
|
|
997c3c888a | ||
|
|
a6baa39988 | ||
|
|
6c93ce5fef | ||
|
|
77557cc391 | ||
|
|
bfac4748b6 | ||
|
|
baf489601c | ||
|
|
e45313c6a1 | ||
|
|
77531419b5 | ||
|
|
32ec0a285c | ||
|
|
d1ebf3fd0d | ||
|
|
ca4532b6bc | ||
|
|
5a7d3a7506 | ||
|
|
1f22e6c5e6 | ||
|
|
61b002f4ff | ||
|
|
2acd7a45c8 | ||
|
|
67dcb244d0 | ||
|
|
be3e1ccca2 | ||
|
|
beefbb44e1 | ||
|
|
3462f4d33f | ||
|
|
f8104a9bdb | ||
|
|
316ab5f380 | ||
|
|
64f9c36d5e | ||
|
|
b7fbea4c34 | ||
|
|
76e5f6f1f3 | ||
|
|
89d2e2c7e8 | ||
|
|
71327d4646 | ||
|
|
1eeaa0edab | ||
|
|
da2d5466d3 | ||
|
|
71f80aff9f | ||
|
|
3f02ff7a9e | ||
|
|
87ff7f6586 | ||
|
|
18a17a77a8 | ||
|
|
483f8d1e34 | ||
|
|
c83f10804e | ||
|
|
cf40bc8ca5 | ||
|
|
2fa902b35f | ||
|
|
16d8ce1cd5 | ||
|
|
1835230a2b | ||
|
|
f1c7ecda61 | ||
|
|
96f56dee02 | ||
|
|
863939f1a7 | ||
|
|
00ad5734ff | ||
|
|
eb88818df9 | ||
|
|
45f920d29b | ||
|
|
d59d21e633 | ||
|
|
e4507caf0b | ||
|
|
f42b9853d3 | ||
|
|
638096b27f | ||
|
|
53a8986af5 | ||
|
|
838268abaf | ||
|
|
9f4ef016d6 | ||
|
|
8bff475612 | ||
|
|
be3787356a | ||
|
|
919a5f9b0b | ||
|
|
20fdc5a174 |
1
.github/dependabot.yml
vendored
1
.github/dependabot.yml
vendored
@@ -6,7 +6,6 @@ updates:
|
|||||||
interval: daily
|
interval: daily
|
||||||
time: '11:00'
|
time: '11:00'
|
||||||
timezone: Japan
|
timezone: Japan
|
||||||
open-pull-requests-limit: 1
|
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
ignore:
|
ignore:
|
||||||
|
|||||||
2
.github/label-commenter-config.yml
vendored
2
.github/label-commenter-config.yml
vendored
@@ -9,7 +9,7 @@ labels:
|
|||||||
issue:
|
issue:
|
||||||
body: |
|
body: |
|
||||||
Please ask questions about GitHub Actions or Hugo at the following forum.
|
Please ask questions about GitHub Actions or Hugo at the following forum.
|
||||||
- [GitHub Actions Community Forum](https://github.community/t5/GitHub-Actions/bd-p/actions)
|
- [GitHub Actions Community Forum](https://github.community/c/github-actions)
|
||||||
- [Hugo Community Forum](https://discourse.gohugo.io/)
|
- [Hugo Community Forum](https://discourse.gohugo.io/)
|
||||||
action: close
|
action: close
|
||||||
- name: wontfix
|
- name: wontfix
|
||||||
|
|||||||
29
.github/workflows/codeql-analysis.yml
vendored
Normal file
29
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
name: "Code Scanning"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
CodeQL-Build:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- run: git checkout HEAD^2
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
2
.github/workflows/dev-image.yml
vendored
2
.github/workflows/dev-image.yml
vendored
@@ -3,7 +3,7 @@ name: 'Dev Image CI'
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/dev-image.yml'
|
- '.github/workflows/dev-image.yml'
|
||||||
- '.dockerignore'
|
- '.dockerignore'
|
||||||
|
|||||||
4
.github/workflows/label-commenter.yml
vendored
4
.github/workflows/label-commenter.yml
vendored
@@ -16,10 +16,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: master
|
ref: main
|
||||||
|
|
||||||
- name: Label Commenter
|
- name: Label Commenter
|
||||||
uses: peaceiris/actions-label-commenter@v1
|
uses: peaceiris/actions-label-commenter@v1.6.1
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# config_file: .github/label-commenter-config.yml
|
# config_file: .github/label-commenter-config.yml
|
||||||
|
|||||||
1
.github/workflows/test-action.yml
vendored
1
.github/workflows/test-action.yml
vendored
@@ -3,6 +3,7 @@ name: Daily Test
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '13 13 * * *'
|
- cron: '13 13 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|||||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@@ -3,7 +3,7 @@ name: 'Test'
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
id: nvm
|
id: nvm
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2.0.0
|
uses: actions/setup-node@v2.1.2
|
||||||
with:
|
with:
|
||||||
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
||||||
|
|
||||||
@@ -56,6 +56,6 @@ jobs:
|
|||||||
name: coverage-${{ matrix.os }}
|
name: coverage-${{ matrix.os }}
|
||||||
path: coverage
|
path: coverage
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v1.0.7
|
- uses: codecov/codecov-action@v1.0.13
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"printWidth": 80,
|
"printWidth": 100,
|
||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
"useTabs": false,
|
"useTabs": false,
|
||||||
"semi": true,
|
"semi": true,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "none",
|
"trailingComma": "none",
|
||||||
"bracketSpacing": false,
|
"bracketSpacing": false,
|
||||||
"arrowParens": "avoid",
|
"arrowParens": "avoid",
|
||||||
"parser": "typescript"
|
"parser": "typescript"
|
||||||
}
|
}
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"git.ignoreLimitWarning": true
|
"git.ignoreLimitWarning": true,
|
||||||
|
"deno.enable": false
|
||||||
}
|
}
|
||||||
109
CHANGELOG.md
109
CHANGELOG.md
@@ -2,6 +2,115 @@
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
## [2.4.13](https://github.com/peaceiris/actions-hugo/compare/v2.4.12...v2.4.13) (2020-10-06)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* change default branch from master to main (#386) ([da2d546](https://github.com/peaceiris/actions-hugo/commit/da2d5466d39aab034669dc2701c6cf17e25082d0)), closes [#386](https://github.com/peaceiris/actions-hugo/issues/386)
|
||||||
|
* change printWidth from 80 to 100 (#365) ([8bff475](https://github.com/peaceiris/actions-hugo/commit/8bff475612e4668972f3cf13bf8ffe48a6da31a3)), closes [#365](https://github.com/peaceiris/actions-hugo/issues/365)
|
||||||
|
* disable deno on vscode (#388) ([71327d4](https://github.com/peaceiris/actions-hugo/commit/71327d464610fe5163689864e5b68d2fb4ceb776)), closes [#388](https://github.com/peaceiris/actions-hugo/issues/388)
|
||||||
|
* fix link to GitHub Actions Community Forum ([919a5f9](https://github.com/peaceiris/actions-hugo/commit/919a5f9b0bd1b53e8bcabd4f014f46d01ea3e5cb))
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* add codeql workflow ([2fa902b](https://github.com/peaceiris/actions-hugo/commit/2fa902b35f172f555ee4764fb8f35f350058907a))
|
||||||
|
* add workflow_dispatch ([1eeaa0e](https://github.com/peaceiris/actions-hugo/commit/1eeaa0edab53b2141fa624e108430359a2e88ddd))
|
||||||
|
* bump actions/setup-node from v2.0.0 to v2.1.0 (#371) ([d59d21e](https://github.com/peaceiris/actions-hugo/commit/d59d21e63364d8b9aa822370f3ebc8c2261d69db)), closes [#371](https://github.com/peaceiris/actions-hugo/issues/371)
|
||||||
|
* bump actions/setup-node from v2.1.0 to v2.1.1 (#392) ([316ab5f](https://github.com/peaceiris/actions-hugo/commit/316ab5f3800f1b485387c80cd13c9507cda1303b)), closes [#392](https://github.com/peaceiris/actions-hugo/issues/392)
|
||||||
|
* bump actions/setup-node from v2.1.1 to v2.1.2 (#449) ([d13e210](https://github.com/peaceiris/actions-hugo/commit/d13e210741153eccc070e1eeb9c1f2d3526c0e6c)), closes [#449](https://github.com/peaceiris/actions-hugo/issues/449)
|
||||||
|
* bump codecov/codecov-action from v1.0.10 to v1.0.11 (#389) ([76e5f6f](https://github.com/peaceiris/actions-hugo/commit/76e5f6f1f3c2f6a2b52209bf45ff6fb647a7dfd2)), closes [#389](https://github.com/peaceiris/actions-hugo/issues/389)
|
||||||
|
* bump codecov/codecov-action from v1.0.11 to v1.0.12 (#393) ([f8104a9](https://github.com/peaceiris/actions-hugo/commit/f8104a9bdbcb58df14a6806b56f7efdf52f923f6)), closes [#393](https://github.com/peaceiris/actions-hugo/issues/393)
|
||||||
|
* bump codecov/codecov-action from v1.0.12 to v1.0.13 (#414) ([c230bfd](https://github.com/peaceiris/actions-hugo/commit/c230bfdf9987fa980cf88815a8bdaf8263b524d1)), closes [#414](https://github.com/peaceiris/actions-hugo/issues/414)
|
||||||
|
* bump codecov/codecov-action from v1.0.7 to v1.0.10 (#373) ([00ad573](https://github.com/peaceiris/actions-hugo/commit/00ad5734ffe779107015e871a2119a3d0a39dabf)), closes [#373](https://github.com/peaceiris/actions-hugo/issues/373)
|
||||||
|
* bump peaceiris/actions-label-commenter from v1 to v1.3.7 (#364) ([be37873](https://github.com/peaceiris/actions-hugo/commit/be3787356a00883bf4555fe5bfc7d96399badaf1)), closes [#364](https://github.com/peaceiris/actions-hugo/issues/364)
|
||||||
|
* bump peaceiris/actions-label-commenter from v1.3.7 to v1.5.0 (#406) ([baf4896](https://github.com/peaceiris/actions-hugo/commit/baf489601c45dddea57fec27266aebb925e8f59e)), closes [#406](https://github.com/peaceiris/actions-hugo/issues/406)
|
||||||
|
* bump peaceiris/actions-label-commenter from v1.5.0 to v1.6.0 (#434) ([3120b3d](https://github.com/peaceiris/actions-hugo/commit/3120b3dd8cded1491ca95f260d3e9453e83a3569)), closes [#434](https://github.com/peaceiris/actions-hugo/issues/434)
|
||||||
|
* bump peaceiris/actions-label-commenter from v1.6.0 to v1.6.1 (#437) ([22a5584](https://github.com/peaceiris/actions-hugo/commit/22a55848e80df28d2847fdbb1689faae37a08a29)), closes [#437](https://github.com/peaceiris/actions-hugo/issues/437)
|
||||||
|
* remove open-pull-requests-limit ([53a8986](https://github.com/peaceiris/actions-hugo/commit/53a8986af5a407ed9b889581cd97b72795d44619))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @actions/core from 1.2.4 to 1.2.5 (#422) ([5825c93](https://github.com/peaceiris/actions-hugo/commit/5825c9307b65034c724a21f02fb1697c12738846)), closes [#422](https://github.com/peaceiris/actions-hugo/issues/422)
|
||||||
|
* bump @actions/core from 1.2.5 to 1.2.6 (#448) ([33a289a](https://github.com/peaceiris/actions-hugo/commit/33a289a0d5de244428f483056fcc356281b21bb5)), closes [#448](https://github.com/peaceiris/actions-hugo/issues/448)
|
||||||
|
* bump @actions/tool-cache from 1.5.5 to 1.6.0 (#383) ([3f02ff7](https://github.com/peaceiris/actions-hugo/commit/3f02ff7a9e8c09b32b229a513855dfea3469b586)), closes [#383](https://github.com/peaceiris/actions-hugo/issues/383)
|
||||||
|
* bump @types/jest from 26.0.0 to 26.0.3 (#369) ([f42b985](https://github.com/peaceiris/actions-hugo/commit/f42b9853d37d1c2b67960f92c4f1467f105d9050)), closes [#369](https://github.com/peaceiris/actions-hugo/issues/369)
|
||||||
|
* bump @types/jest from 26.0.10 to 26.0.12 (#425) ([6b13193](https://github.com/peaceiris/actions-hugo/commit/6b131935e45ad0d1ec561c2fc3bb43dba781978c)), closes [#425](https://github.com/peaceiris/actions-hugo/issues/425)
|
||||||
|
* bump @types/jest from 26.0.12 to 26.0.13 (#427) ([b59871c](https://github.com/peaceiris/actions-hugo/commit/b59871c37d97cbbb3ad6b14b5efb20134367a886)), closes [#427](https://github.com/peaceiris/actions-hugo/issues/427)
|
||||||
|
* bump @types/jest from 26.0.13 to 26.0.14 (#442) ([3317f5e](https://github.com/peaceiris/actions-hugo/commit/3317f5e6cdcbc51c69a4c9eb9fceb445a78f08ad)), closes [#442](https://github.com/peaceiris/actions-hugo/issues/442)
|
||||||
|
* bump @types/jest from 26.0.3 to 26.0.4 (#378) ([16d8ce1](https://github.com/peaceiris/actions-hugo/commit/16d8ce1cd5912320ea2cac7bae2040fcc49fdc71)), closes [#378](https://github.com/peaceiris/actions-hugo/issues/378)
|
||||||
|
* bump @types/jest from 26.0.4 to 26.0.5 (#390) ([b7fbea4](https://github.com/peaceiris/actions-hugo/commit/b7fbea4c342a48c1ab8f134904b6bf08e1a8778c)), closes [#390](https://github.com/peaceiris/actions-hugo/issues/390)
|
||||||
|
* bump @types/jest from 26.0.5 to 26.0.7 (#394) ([be3e1cc](https://github.com/peaceiris/actions-hugo/commit/be3e1ccca2b306b40d88010110f71697a24ab5ea)), closes [#394](https://github.com/peaceiris/actions-hugo/issues/394)
|
||||||
|
* bump @types/jest from 26.0.7 to 26.0.8 (#405) ([7753141](https://github.com/peaceiris/actions-hugo/commit/77531419b598596623841e82209ed5248c48dd57)), closes [#405](https://github.com/peaceiris/actions-hugo/issues/405)
|
||||||
|
* bump @types/jest from 26.0.8 to 26.0.9 (#407) ([77557cc](https://github.com/peaceiris/actions-hugo/commit/77557cc3914eee0b1f7032fb817b254d0f058349)), closes [#407](https://github.com/peaceiris/actions-hugo/issues/407)
|
||||||
|
* bump @types/jest from 26.0.9 to 26.0.10 (#412) ([6ec44a7](https://github.com/peaceiris/actions-hugo/commit/6ec44a730389338c62ba4c4ef5e1852434143313)), closes [#412](https://github.com/peaceiris/actions-hugo/issues/412)
|
||||||
|
* bump @types/node from 12.12.47 to 12.12.48 (#379) ([1835230](https://github.com/peaceiris/actions-hugo/commit/1835230a2b35e8911a4bb269dec0288e382a71b7)), closes [#379](https://github.com/peaceiris/actions-hugo/issues/379)
|
||||||
|
* bump @types/node from 12.12.48 to 12.12.50 (#381) ([cf40bc8](https://github.com/peaceiris/actions-hugo/commit/cf40bc8ca5e14cd0ec57951a98733f086bbcfa16)), closes [#381](https://github.com/peaceiris/actions-hugo/issues/381)
|
||||||
|
* bump @types/node from 12.12.50 to 12.12.51 (#391) ([64f9c36](https://github.com/peaceiris/actions-hugo/commit/64f9c36d5ec62f7959fe8b3043824439ace7cde4)), closes [#391](https://github.com/peaceiris/actions-hugo/issues/391)
|
||||||
|
* bump @types/node from 12.12.51 to 12.12.52 (#395) ([beefbb4](https://github.com/peaceiris/actions-hugo/commit/beefbb44e1de5739a9b1dd7bbc10d1606f9866f6)), closes [#395](https://github.com/peaceiris/actions-hugo/issues/395)
|
||||||
|
* bump @types/node from 12.12.52 to 12.12.53 (#396) ([67dcb24](https://github.com/peaceiris/actions-hugo/commit/67dcb244d0ca45c57445c2fb646552b1cf03c65c)), closes [#396](https://github.com/peaceiris/actions-hugo/issues/396)
|
||||||
|
* bump @types/node from 12.12.53 to 12.12.54 (#408) ([bfac474](https://github.com/peaceiris/actions-hugo/commit/bfac4748b6753a66efa47642234fc23d92c74334)), closes [#408](https://github.com/peaceiris/actions-hugo/issues/408)
|
||||||
|
* bump @types/node from 12.12.54 to 12.12.55 (#426) ([e7fbc0b](https://github.com/peaceiris/actions-hugo/commit/e7fbc0b5dad38548f6a1cab00814f07b63f21806)), closes [#426](https://github.com/peaceiris/actions-hugo/issues/426)
|
||||||
|
* bump @types/node from 12.12.55 to 12.12.56 (#432) ([79ed21e](https://github.com/peaceiris/actions-hugo/commit/79ed21ee9b1e2b96609fad1b17645284c8a339d3)), closes [#432](https://github.com/peaceiris/actions-hugo/issues/432)
|
||||||
|
* bump @types/node from 12.12.56 to 12.12.57 (#433) ([4b04428](https://github.com/peaceiris/actions-hugo/commit/4b04428f53d215bc618147869807115d6ed825df)), closes [#433](https://github.com/peaceiris/actions-hugo/issues/433)
|
||||||
|
* bump @types/node from 12.12.57 to 12.12.58 (#436) ([f0e8386](https://github.com/peaceiris/actions-hugo/commit/f0e838658fd4fea293ab1875dd0c02f7d89599f1)), closes [#436](https://github.com/peaceiris/actions-hugo/issues/436)
|
||||||
|
* bump @types/node from 12.12.58 to 12.12.59 (#441) ([873c0ab](https://github.com/peaceiris/actions-hugo/commit/873c0ab6caaa6d57841d9a749e0183f4ade7e035)), closes [#441](https://github.com/peaceiris/actions-hugo/issues/441)
|
||||||
|
* bump @types/node from 12.12.59 to 12.12.61 (#443) ([5e135f6](https://github.com/peaceiris/actions-hugo/commit/5e135f617c2558ff55cca069e94b283e0399834d)), closes [#443](https://github.com/peaceiris/actions-hugo/issues/443)
|
||||||
|
* bump @types/node from 12.12.61 to 12.12.62 (#445) ([267b3f1](https://github.com/peaceiris/actions-hugo/commit/267b3f1c66006dcdc3a7db3d4e3def0a08a1459c)), closes [#445](https://github.com/peaceiris/actions-hugo/issues/445)
|
||||||
|
* bump @types/node from 12.12.62 to 12.12.63 (#451) ([cd215c4](https://github.com/peaceiris/actions-hugo/commit/cd215c4ce492dcca194a5b75f694eeef53dd09c2)), closes [#451](https://github.com/peaceiris/actions-hugo/issues/451)
|
||||||
|
* bump @vercel/ncc from 0.23.0 to 0.24.0 (#424) ([5b3d1ee](https://github.com/peaceiris/actions-hugo/commit/5b3d1ee00716bbabf4b3209c6005152d4379a29f)), closes [#424](https://github.com/peaceiris/actions-hugo/issues/424)
|
||||||
|
* bump @vercel/ncc from 0.24.0 to 0.24.1 (#438) ([802b595](https://github.com/peaceiris/actions-hugo/commit/802b5950937d77eb06be7ba586ed59425b72ed8d)), closes [#438](https://github.com/peaceiris/actions-hugo/issues/438)
|
||||||
|
* bump eslint-plugin-jest from 23.13.2 to 23.16.0 (#366) ([9f4ef01](https://github.com/peaceiris/actions-hugo/commit/9f4ef016d64fc31a87ea56518d6cf1f92c8cb0a2)), closes [#366](https://github.com/peaceiris/actions-hugo/issues/366)
|
||||||
|
* bump eslint-plugin-jest from 23.16.0 to 23.17.1 (#368) ([638096b](https://github.com/peaceiris/actions-hugo/commit/638096b27ff13e63f4f90e4d5bf05e814edcebcc)), closes [#368](https://github.com/peaceiris/actions-hugo/issues/368)
|
||||||
|
* bump eslint-plugin-jest from 23.17.1 to 23.18.0 (#377) ([f1c7ecd](https://github.com/peaceiris/actions-hugo/commit/f1c7ecda6150ba2c6dbbce39119d6f5b0ad723bf)), closes [#377](https://github.com/peaceiris/actions-hugo/issues/377)
|
||||||
|
* bump eslint-plugin-jest from 23.18.0 to 23.18.2 (#397) ([2acd7a4](https://github.com/peaceiris/actions-hugo/commit/2acd7a45c87d54f0d53e7929649160f728cc4f74)), closes [#397](https://github.com/peaceiris/actions-hugo/issues/397)
|
||||||
|
* bump eslint-plugin-jest from 23.18.2 to 23.19.0 (#400) ([5a7d3a7](https://github.com/peaceiris/actions-hugo/commit/5a7d3a75068f8dddac3aaa407896f38a7109e347)), closes [#400](https://github.com/peaceiris/actions-hugo/issues/400)
|
||||||
|
* bump eslint-plugin-jest from 23.19.0 to 23.20.0 (#401) ([32ec0a2](https://github.com/peaceiris/actions-hugo/commit/32ec0a285c6a0dd4f2df66f9851f319f1fbd8abe)), closes [#401](https://github.com/peaceiris/actions-hugo/issues/401)
|
||||||
|
* bump git from 2.27.0 to 2.28.0 (#398) ([61b002f](https://github.com/peaceiris/actions-hugo/commit/61b002f4ffb3492723a32a2d9539df503c9776c1)), closes [#398](https://github.com/peaceiris/actions-hugo/issues/398)
|
||||||
|
* bump husky from 4.2.5 to 4.3.0 (#431) ([4c60b23](https://github.com/peaceiris/actions-hugo/commit/4c60b233f21cff00faffa17a99bd07c924e19efd)), closes [#431](https://github.com/peaceiris/actions-hugo/issues/431)
|
||||||
|
* bump jest-circus from 26.0.1 to 26.1.0 (#367) ([838268a](https://github.com/peaceiris/actions-hugo/commit/838268abaf30b5c3b2e0cd5ce852fd870498f45f)), closes [#367](https://github.com/peaceiris/actions-hugo/issues/367)
|
||||||
|
* bump jest-circus from 26.1.0 to 26.2.1 (#402) ([d1ebf3f](https://github.com/peaceiris/actions-hugo/commit/d1ebf3fd0d7cf76c277b7c1d8c7839858002a9cc)), closes [#402](https://github.com/peaceiris/actions-hugo/issues/402)
|
||||||
|
* bump jest-circus from 26.2.1 to 26.2.2 (#404) ([e45313c](https://github.com/peaceiris/actions-hugo/commit/e45313c6a1dc39551c2fdbb4bee2f4b8ccbe95a1)), closes [#404](https://github.com/peaceiris/actions-hugo/issues/404)
|
||||||
|
* bump jest-circus from 26.2.2 to 26.3.0 (#409) ([6c93ce5](https://github.com/peaceiris/actions-hugo/commit/6c93ce5fefba5bc01d294f4d82d61f593fbf789f)), closes [#409](https://github.com/peaceiris/actions-hugo/issues/409)
|
||||||
|
* bump jest-circus from 26.3.0 to 26.4.0 (#411) ([997c3c8](https://github.com/peaceiris/actions-hugo/commit/997c3c888aa18613298ce0e513eea735f20f79ed)), closes [#411](https://github.com/peaceiris/actions-hugo/issues/411)
|
||||||
|
* bump jest-circus from 26.4.0 to 26.4.1 (#415) ([e0b4d02](https://github.com/peaceiris/actions-hugo/commit/e0b4d029a23577852cd59f4b1d23c1d1d699e266)), closes [#415](https://github.com/peaceiris/actions-hugo/issues/415)
|
||||||
|
* bump jest-circus from 26.4.1 to 26.4.2 (#417) ([caf4dd6](https://github.com/peaceiris/actions-hugo/commit/caf4dd6aaebf0047f62f6a9957fc95db56c0fa03)), closes [#417](https://github.com/peaceiris/actions-hugo/issues/417)
|
||||||
|
* bump jest-circus from 26.4.2 to 26.5.1 (#452) ([88b26ab](https://github.com/peaceiris/actions-hugo/commit/88b26abfee0c22c81cafe781cc7e3693114f9395)), closes [#452](https://github.com/peaceiris/actions-hugo/issues/452)
|
||||||
|
* bump lint-staged from 10.2.11 to 10.2.13 (#421) ([b0f29e7](https://github.com/peaceiris/actions-hugo/commit/b0f29e7edec0ad7fe12d4b9434826e4a96477569)), closes [#421](https://github.com/peaceiris/actions-hugo/issues/421)
|
||||||
|
* bump lint-staged from 10.2.13 to 10.3.0 (#428) ([4e17872](https://github.com/peaceiris/actions-hugo/commit/4e17872cd1999a77ff3faef0a282c3ded0b28b3c)), closes [#428](https://github.com/peaceiris/actions-hugo/issues/428)
|
||||||
|
* bump lint-staged from 10.3.0 to 10.4.0 (#444) ([3c58869](https://github.com/peaceiris/actions-hugo/commit/3c588690f52351f1370705f9a5f1c63aed991de3)), closes [#444](https://github.com/peaceiris/actions-hugo/issues/444)
|
||||||
|
* bump lodash from 4.17.15 to 4.17.19 (#385) ([71f80af](https://github.com/peaceiris/actions-hugo/commit/71f80aff9fddceefe3b6992d8c6956af13d5727e)), closes [#385](https://github.com/peaceiris/actions-hugo/issues/385)
|
||||||
|
* bump nock from 12.0.3 to 13.0.0 (#370) ([e4507ca](https://github.com/peaceiris/actions-hugo/commit/e4507caf0b86e8bac1307a239121c70bd62939bd)), closes [#370](https://github.com/peaceiris/actions-hugo/issues/370)
|
||||||
|
* bump nock from 13.0.0 to 13.0.1 (#372) ([45f920d](https://github.com/peaceiris/actions-hugo/commit/45f920d29b694bdae5abae2ca5e8e4a0c7ba485f)), closes [#372](https://github.com/peaceiris/actions-hugo/issues/372)
|
||||||
|
* bump nock from 13.0.1 to 13.0.2 (#375) ([eb88818](https://github.com/peaceiris/actions-hugo/commit/eb88818df93189cd54c302fdc18a2c6e876ab08e)), closes [#375](https://github.com/peaceiris/actions-hugo/issues/375)
|
||||||
|
* bump nock from 13.0.2 to 13.0.3 (#399) ([1f22e6c](https://github.com/peaceiris/actions-hugo/commit/1f22e6c5e634fdfb21daa12d295feac44d428630)), closes [#399](https://github.com/peaceiris/actions-hugo/issues/399)
|
||||||
|
* bump nock from 13.0.3 to 13.0.4 (#410) ([a6baa39](https://github.com/peaceiris/actions-hugo/commit/a6baa39988b85528fd574be8e232a06f72c397b5)), closes [#410](https://github.com/peaceiris/actions-hugo/issues/410)
|
||||||
|
* bump node from 12.18.1 to 12.18.2 (#376) ([96f56de](https://github.com/peaceiris/actions-hugo/commit/96f56dee02dd507288dcd0d32b1aabceda20a532)), closes [#376](https://github.com/peaceiris/actions-hugo/issues/376)
|
||||||
|
* bump node from 12.18.2 to 12.18.3 ([ca4532b](https://github.com/peaceiris/actions-hugo/commit/ca4532b6bc8a7a24dd2f638a848293cfef749689))
|
||||||
|
* bump node from 12.18.3 to 12.18.4 (#446) ([01cbeb8](https://github.com/peaceiris/actions-hugo/commit/01cbeb899ce86671ad0d046f1c1dbc9d716bf993)), closes [#446](https://github.com/peaceiris/actions-hugo/issues/446)
|
||||||
|
* bump node-fetch from 2.6.0 to 2.6.1 (#430) ([bcbb69d](https://github.com/peaceiris/actions-hugo/commit/bcbb69dfa4370721c165c579cf4b3482ff90516d)), closes [#430](https://github.com/peaceiris/actions-hugo/issues/430)
|
||||||
|
* bump prettier from 2.0.5 to 2.1.0 (#420) ([b94c20b](https://github.com/peaceiris/actions-hugo/commit/b94c20b65d1926fb5cb0534acfa17b7df493dd01)), closes [#420](https://github.com/peaceiris/actions-hugo/issues/420)
|
||||||
|
* bump prettier from 2.1.0 to 2.1.1 (#423) ([5a94243](https://github.com/peaceiris/actions-hugo/commit/5a94243d0517bf420266d6ffb22242a01b78bf57)), closes [#423](https://github.com/peaceiris/actions-hugo/issues/423)
|
||||||
|
* bump prettier from 2.1.1 to 2.1.2 (#440) ([fe1c07b](https://github.com/peaceiris/actions-hugo/commit/fe1c07bf2734c9b8a15afb63935b1017386a1a4d)), closes [#440](https://github.com/peaceiris/actions-hugo/issues/440)
|
||||||
|
* bump standard-version from 8.0.0 to 8.0.1 (#380) ([c83f108](https://github.com/peaceiris/actions-hugo/commit/c83f10804ea39b937ad407c2d32fdbbf4fd4c33a)), closes [#380](https://github.com/peaceiris/actions-hugo/issues/380)
|
||||||
|
* bump standard-version from 8.0.1 to 8.0.2 (#382) ([483f8d1](https://github.com/peaceiris/actions-hugo/commit/483f8d1e3415ac3bf8da95136807f5f1649a9b14)), closes [#382](https://github.com/peaceiris/actions-hugo/issues/382)
|
||||||
|
* bump standard-version from 8.0.2 to 9.0.0 (#413) ([444111b](https://github.com/peaceiris/actions-hugo/commit/444111b78ca0f838547e0d52086bd7ec6b4b99ad)), closes [#413](https://github.com/peaceiris/actions-hugo/issues/413)
|
||||||
|
* bump typescript from 3.9.5 to 3.9.6 (#374) ([863939f](https://github.com/peaceiris/actions-hugo/commit/863939f1a75eefbae6e227e72b90de2a2e96852c)), closes [#374](https://github.com/peaceiris/actions-hugo/issues/374)
|
||||||
|
* bump typescript from 3.9.6 to 3.9.7 (#384) ([87ff7f6](https://github.com/peaceiris/actions-hugo/commit/87ff7f6586ac91744342582f9c3030f0c4b72248)), closes [#384](https://github.com/peaceiris/actions-hugo/issues/384)
|
||||||
|
* change @zeit/ncc to @vercel/ncc (#416) ([aba4ae3](https://github.com/peaceiris/actions-hugo/commit/aba4ae31955192d3944543150f99cf2e9365a1aa)), closes [#416](https://github.com/peaceiris/actions-hugo/issues/416)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* Add Caching Hugo Modules ([18a809e](https://github.com/peaceiris/actions-hugo/commit/18a809e6c96de4cb534ad52f31dfe28ef32bd7d5))
|
||||||
|
* Add Code Scanning workflow badge ([3462f4d](https://github.com/peaceiris/actions-hugo/commit/3462f4d33fccdc8d712508ddddcebaa8ef5384df))
|
||||||
|
* add full docker image ([4245d14](https://github.com/peaceiris/actions-hugo/commit/4245d148471b602b24f602d8634fb289fe74ca90))
|
||||||
|
* add note about branch to deploy (#419) ([71168fa](https://github.com/peaceiris/actions-hugo/commit/71168fab79f89371c87c6175ddd208ffada9cf0e)), closes [#419](https://github.com/peaceiris/actions-hugo/issues/419)
|
||||||
|
* bump hugo from 0.71.1 to 0.74.1 ([18a17a7](https://github.com/peaceiris/actions-hugo/commit/18a17a77a865be445d1ee0fbe251655fa53f8509))
|
||||||
|
* bump hugo from 0.74.1 to 0.74.2 ([89d2e2c](https://github.com/peaceiris/actions-hugo/commit/89d2e2c7e8c62e5c50d0deadcd5f163b80dae639))
|
||||||
|
* bump Hugo from 0.74.2 to 0.75.1 (#439) ([e091c92](https://github.com/peaceiris/actions-hugo/commit/e091c924f25bf7adb8a8662ace3b28429b1ae5c8)), closes [#439](https://github.com/peaceiris/actions-hugo/issues/439)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.4.12](https://github.com/peaceiris/actions-hugo/compare/v2.4.11...v2.4.12) (2020-06-21)
|
## [2.4.12](https://github.com/peaceiris/actions-hugo/compare/v2.4.11...v2.4.12) (2020-06-21)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ RUN apt-get update && \
|
|||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /git
|
WORKDIR /git
|
||||||
ENV GIT_VERSION="2.27.0"
|
ENV GIT_VERSION="2.28.0"
|
||||||
RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
|
RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
|
||||||
tar -zxf "./v${GIT_VERSION}.tar.gz" && \
|
tar -zxf "./v${GIT_VERSION}.tar.gz" && \
|
||||||
rm "./v${GIT_VERSION}.tar.gz" && \
|
rm "./v${GIT_VERSION}.tar.gz" && \
|
||||||
|
|||||||
46
README.md
46
README.md
@@ -1,11 +1,12 @@
|
|||||||
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
[](https://github.com/peaceiris/actions-hugo/blob/main/LICENSE)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases)
|
[](https://github.com/peaceiris/actions-hugo/releases)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases.atom)
|
[](https://github.com/peaceiris/actions-hugo/releases.atom)
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
[](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
|
[](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
|
||||||
[](https://codecov.io/gh/peaceiris/actions-hugo)
|
[](https://codecov.io/gh/peaceiris/actions-hugo)
|
||||||
[](https://codeclimate.com/github/peaceiris/actions-hugo/maintainability)
|
[](https://codeclimate.com/github/peaceiris/actions-hugo/maintainability)
|
||||||
|
|
||||||
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
|
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
|
||||||
@@ -46,6 +47,7 @@ Thanks to this change, we can complete this action in less than a few seconds.
|
|||||||
- [⭐️ Use Hugo extended](#%EF%B8%8F-use-hugo-extended)
|
- [⭐️ Use Hugo extended](#%EF%B8%8F-use-hugo-extended)
|
||||||
- [⭐️ Use the latest version of Hugo](#%EF%B8%8F-use-the-latest-version-of-hugo)
|
- [⭐️ Use the latest version of Hugo](#%EF%B8%8F-use-the-latest-version-of-hugo)
|
||||||
- [Tips](#tips)
|
- [Tips](#tips)
|
||||||
|
- [⭐️ Caching Hugo Modules](#%EF%B8%8F-caching-hugo-modules)
|
||||||
- [⭐️ Read Hugo version from file](#%EF%B8%8F-read-hugo-version-from-file)
|
- [⭐️ Read Hugo version from file](#%EF%B8%8F-read-hugo-version-from-file)
|
||||||
- [⭐️ Workflow for autoprefixer and postcss-cli](#%EF%B8%8F-workflow-for-autoprefixer-and-postcss-cli)
|
- [⭐️ Workflow for autoprefixer and postcss-cli](#%EF%B8%8F-workflow-for-autoprefixer-and-postcss-cli)
|
||||||
- [⭐️ Workflow for asciidoctor](#%EF%B8%8F-workflow-for-asciidoctor)
|
- [⭐️ Workflow for asciidoctor](#%EF%B8%8F-workflow-for-asciidoctor)
|
||||||
@@ -75,7 +77,7 @@ name: github pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main # Set a branch to deploy
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@@ -89,7 +91,7 @@ jobs:
|
|||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.71.1'
|
hugo-version: '0.75.1'
|
||||||
# extended: true
|
# extended: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -118,7 +120,7 @@ Set `extended: true` to use a Hugo extended version.
|
|||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.71.1'
|
hugo-version: '0.75.1'
|
||||||
extended: true
|
extended: true
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -143,6 +145,23 @@ This action fetches the latest version of Hugo by [hugo | Homebrew Formulae](htt
|
|||||||
|
|
||||||
## Tips
|
## Tips
|
||||||
|
|
||||||
|
### ⭐️ Caching Hugo Modules
|
||||||
|
|
||||||
|
Insert a cache step before site-building as follows.
|
||||||
|
Note that the cache dir location of Hugo on a Linux-based operating system is `/tmp/hugo_cache`. On macOS, `${TMPDIR}/hugo_cache` has the location.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/hugo_cache
|
||||||
|
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hugomod-
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: hugo --minify
|
||||||
|
```
|
||||||
|
|
||||||
### ⭐️ Read Hugo version from file
|
### ⭐️ Read Hugo version from file
|
||||||
|
|
||||||
How to sync a Hugo version between a Docker Compose and a GitHub Actions workflow via `.env` file.
|
How to sync a Hugo version between a Docker Compose and a GitHub Actions workflow via `.env` file.
|
||||||
@@ -150,7 +169,7 @@ How to sync a Hugo version between a Docker Compose and a GitHub Actions workflo
|
|||||||
Write a `HUGO_VERSION` to the `.env` file like the following and push it to a remote branch.
|
Write a `HUGO_VERSION` to the `.env` file like the following and push it to a remote branch.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
HUGO_VERSION=0.71.1
|
HUGO_VERSION=0.75.1
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, add a step to read a Hugo version from the `.env` file.
|
Next, add a step to read a Hugo version from the `.env` file.
|
||||||
@@ -178,7 +197,8 @@ services:
|
|||||||
hugo:
|
hugo:
|
||||||
container_name: hugo
|
container_name: hugo
|
||||||
image: "peaceiris/hugo:v${HUGO_VERSION}"
|
image: "peaceiris/hugo:v${HUGO_VERSION}"
|
||||||
# image: peaceiris/hugo:v${HUGO_VERSION}-mod # Hugo Modules
|
# image: peaceiris/hugo:v${HUGO_VERSION}-mod # Hugo Modules
|
||||||
|
# image: peaceiris/hugo:v${HUGO_VERSION}-full # Hugo Modules and Node.js
|
||||||
ports:
|
ports:
|
||||||
- 1313:1313
|
- 1313:1313
|
||||||
volumes:
|
volumes:
|
||||||
@@ -210,7 +230,7 @@ name: github pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main # Set a branch to deploy
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@@ -224,7 +244,7 @@ jobs:
|
|||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.71.1'
|
hugo-version: '0.75.1'
|
||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
@@ -259,7 +279,7 @@ name: github pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main # Set a branch to deploy
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@@ -273,7 +293,7 @@ jobs:
|
|||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.71.1'
|
hugo-version: '0.75.1'
|
||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
- name: Setup Ruby
|
- name: Setup Ruby
|
||||||
@@ -310,7 +330,7 @@ jobs:
|
|||||||
|
|
||||||
- [MIT License - peaceiris/actions-hugo]
|
- [MIT License - peaceiris/actions-hugo]
|
||||||
|
|
||||||
[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/master/LICENSE
|
[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/main/LICENSE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,15 +27,9 @@ describe('getURL()', () => {
|
|||||||
|
|
||||||
describe('getLatestVersion()', () => {
|
describe('getLatestVersion()', () => {
|
||||||
test('return latest version via brew', async () => {
|
test('return latest version via brew', async () => {
|
||||||
nock('https://formulae.brew.sh')
|
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(200, jsonTestBrew);
|
||||||
.get(`/api/formula/${Tool.Repo}.json`)
|
|
||||||
.reply(200, jsonTestBrew);
|
|
||||||
|
|
||||||
const versionLatest: string = await getLatestVersion(
|
const versionLatest: string = await getLatestVersion(Tool.Org, Tool.Repo, 'brew');
|
||||||
Tool.Org,
|
|
||||||
Tool.Repo,
|
|
||||||
'brew'
|
|
||||||
);
|
|
||||||
expect(versionLatest).toMatch(Tool.TestVersionLatest);
|
expect(versionLatest).toMatch(Tool.TestVersionLatest);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -44,21 +38,13 @@ describe('getLatestVersion()', () => {
|
|||||||
.get(`/repos/${Tool.Org}/${Tool.Repo}/releases/latest`)
|
.get(`/repos/${Tool.Org}/${Tool.Repo}/releases/latest`)
|
||||||
.reply(200, jsonTestGithub);
|
.reply(200, jsonTestGithub);
|
||||||
|
|
||||||
const versionLatest: string = await getLatestVersion(
|
const versionLatest: string = await getLatestVersion(Tool.Org, Tool.Repo, 'github');
|
||||||
Tool.Org,
|
|
||||||
Tool.Repo,
|
|
||||||
'github'
|
|
||||||
);
|
|
||||||
expect(versionLatest).toMatch(Tool.TestVersionLatest);
|
expect(versionLatest).toMatch(Tool.TestVersionLatest);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('return exception 404', async () => {
|
test('return exception 404', async () => {
|
||||||
nock('https://formulae.brew.sh')
|
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(404);
|
||||||
.get(`/api/formula/${Tool.Repo}.json`)
|
|
||||||
.reply(404);
|
|
||||||
|
|
||||||
await expect(
|
await expect(getLatestVersion(Tool.Org, Tool.Repo, 'brew')).rejects.toThrowError(FetchError);
|
||||||
getLatestVersion(Tool.Org, Tool.Repo, 'brew')
|
|
||||||
).rejects.toThrowError(FetchError);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import getURL from '../src/get-url';
|
|||||||
|
|
||||||
describe('getURL()', () => {
|
describe('getURL()', () => {
|
||||||
test('test', () => {
|
test('test', () => {
|
||||||
const baseURL =
|
const baseURL = 'https://github.com/gohugoio/hugo/releases/download/v0.58.2';
|
||||||
'https://github.com/gohugoio/hugo/releases/download/v0.58.2';
|
|
||||||
const urlLinux = `${baseURL}/hugo_0.58.2_Linux-64bit.tar.gz`;
|
const urlLinux = `${baseURL}/hugo_0.58.2_Linux-64bit.tar.gz`;
|
||||||
const urlLinuxExtended = `${baseURL}/hugo_extended_0.58.2_Linux-64bit.tar.gz`;
|
const urlLinuxExtended = `${baseURL}/hugo_extended_0.58.2_Linux-64bit.tar.gz`;
|
||||||
const urlMacOS = `${baseURL}/hugo_0.58.2_macOS-64bit.tar.gz`;
|
const urlMacOS = `${baseURL}/hugo_0.58.2_macOS-64bit.tar.gz`;
|
||||||
|
|||||||
@@ -43,36 +43,26 @@ describe('Integration testing run()', () => {
|
|||||||
test('succeed in installing the latest version', async () => {
|
test('succeed in installing the latest version', async () => {
|
||||||
const testVersion = 'latest';
|
const testVersion = 'latest';
|
||||||
process.env['INPUT_HUGO-VERSION'] = testVersion;
|
process.env['INPUT_HUGO-VERSION'] = testVersion;
|
||||||
nock('https://formulae.brew.sh')
|
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(200, jsonTestBrew);
|
||||||
.get(`/api/formula/${Tool.Repo}.json`)
|
|
||||||
.reply(200, jsonTestBrew);
|
|
||||||
const result: main.ActionResult = await main.run();
|
const result: main.ActionResult = await main.run();
|
||||||
expect(result.exitcode).toBe(0);
|
expect(result.exitcode).toBe(0);
|
||||||
expect(result.output).toMatch(
|
expect(result.output).toMatch(`Hugo Static Site Generator v${Tool.TestVersionLatest}`);
|
||||||
`Hugo Static Site Generator v${Tool.TestVersionLatest}`
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('succeed in installing the latest extended version', async () => {
|
test('succeed in installing the latest extended version', async () => {
|
||||||
const testVersion = 'latest';
|
const testVersion = 'latest';
|
||||||
process.env['INPUT_HUGO-VERSION'] = testVersion;
|
process.env['INPUT_HUGO-VERSION'] = testVersion;
|
||||||
process.env['INPUT_EXTENDED'] = 'true';
|
process.env['INPUT_EXTENDED'] = 'true';
|
||||||
nock('https://formulae.brew.sh')
|
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(200, jsonTestBrew);
|
||||||
.get(`/api/formula/${Tool.Repo}.json`)
|
|
||||||
.reply(200, jsonTestBrew);
|
|
||||||
const result: main.ActionResult = await main.run();
|
const result: main.ActionResult = await main.run();
|
||||||
expect(result.exitcode).toBe(0);
|
expect(result.exitcode).toBe(0);
|
||||||
expect(result.output).toMatch(
|
expect(result.output).toMatch(`Hugo Static Site Generator v${Tool.TestVersionLatest}`);
|
||||||
`Hugo Static Site Generator v${Tool.TestVersionLatest}`
|
|
||||||
);
|
|
||||||
expect(result.output).toMatch(`extended`);
|
expect(result.output).toMatch(`extended`);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('fail to install the latest version due to 404 of brew', async () => {
|
test('fail to install the latest version due to 404 of brew', async () => {
|
||||||
process.env['INPUT_HUGO-VERSION'] = 'latest';
|
process.env['INPUT_HUGO-VERSION'] = 'latest';
|
||||||
nock('https://formulae.brew.sh')
|
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(404);
|
||||||
.get(`/api/formula/${Tool.Repo}.json`)
|
|
||||||
.reply(404);
|
|
||||||
|
|
||||||
await expect(main.run()).rejects.toThrowError(FetchError);
|
await expect(main.run()).rejects.toThrowError(FetchError);
|
||||||
});
|
});
|
||||||
@@ -91,8 +81,6 @@ describe('showVersion()', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('return not found', async () => {
|
test('return not found', async () => {
|
||||||
await expect(
|
await expect(main.showVersion('gitgit', ['--version'])).rejects.toThrowError(Error);
|
||||||
main.showVersion('gitgit', ['--version'])
|
|
||||||
).rejects.toThrowError(Error);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
8152
lib/index.js
8152
lib/index.js
File diff suppressed because it is too large
Load Diff
1806
package-lock.json
generated
1806
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "actions-hugo",
|
"name": "actions-hugo",
|
||||||
"version": "2.4.12",
|
"version": "2.4.13",
|
||||||
"description": "GitHub Actions for Hugo",
|
"description": "GitHub Actions for Hugo",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"src/**/*.ts": [
|
"{src,__tests__}/**/*.ts": [
|
||||||
"prettier --check",
|
"prettier --check",
|
||||||
"eslint"
|
"eslint"
|
||||||
],
|
],
|
||||||
@@ -54,29 +54,29 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.4",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.5.5",
|
"@actions/tool-cache": "^1.6.0",
|
||||||
"node-fetch": "^2.6.0"
|
"node-fetch": "^2.6.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.0",
|
"@types/jest": "^26.0.14",
|
||||||
"@types/node": "~12",
|
"@types/node": "~12",
|
||||||
"@types/node-fetch": "^2.5.7",
|
"@types/node-fetch": "^2.5.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.34.0",
|
"@typescript-eslint/eslint-plugin": "^2.34.0",
|
||||||
"@typescript-eslint/parser": "^2.34.0",
|
"@typescript-eslint/parser": "^2.34.0",
|
||||||
"@zeit/ncc": "^0.22.3",
|
"@vercel/ncc": "^0.24.1",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-plugin-jest": "^23.13.2",
|
"eslint-plugin-jest": "^23.20.0",
|
||||||
"husky": "^4.2.5",
|
"husky": "^4.3.0",
|
||||||
"jest": "^25.5.4",
|
"jest": "^25.5.4",
|
||||||
"jest-circus": "^26.0.1",
|
"jest-circus": "^26.5.1",
|
||||||
"lint-staged": "^10.2.11",
|
"lint-staged": "^10.4.0",
|
||||||
"nock": "^12.0.3",
|
"nock": "^13.0.4",
|
||||||
"prettier": "2.0.5",
|
"prettier": "2.1.2",
|
||||||
"standard-version": "^8.0.0",
|
"standard-version": "^9.0.0",
|
||||||
"ts-jest": "^25.5.1",
|
"ts-jest": "^25.5.1",
|
||||||
"typescript": "^3.9.5"
|
"typescript": "^3.9.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
release.sh
10
release.sh
@@ -3,8 +3,10 @@
|
|||||||
# fail on unset variables and command errors
|
# fail on unset variables and command errors
|
||||||
set -eu -o pipefail # -x: is for debugging
|
set -eu -o pipefail # -x: is for debugging
|
||||||
|
|
||||||
if [ "$(git branch --show-current)" != "master" ]; then
|
DEFAULT_BRANCH="main"
|
||||||
echo "$0: Current branch is not master" 1>&2
|
|
||||||
|
if [ "$(git branch --show-current)" != "${DEFAULT_BRANCH}" ]; then
|
||||||
|
echo "$0: Current branch is not ${DEFAULT_BRANCH}" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -26,7 +28,7 @@ if [ "${res}" = "n" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git pull origin master
|
git pull origin "${DEFAULT_BRANCH}"
|
||||||
git tag -d v2 || true
|
git tag -d v2 || true
|
||||||
git pull origin --tags
|
git pull origin --tags
|
||||||
|
|
||||||
@@ -44,5 +46,5 @@ rm -rf ./lib
|
|||||||
git commit -m "chore(release): Remove build assets [skip ci]"
|
git commit -m "chore(release): Remove build assets [skip ci]"
|
||||||
|
|
||||||
TAG_NAME="v$(jq -r '.version' ./package.json)"
|
TAG_NAME="v$(jq -r '.version' ./package.json)"
|
||||||
git push origin master
|
git push origin "${DEFAULT_BRANCH}"
|
||||||
git push origin "${TAG_NAME}"
|
git push origin "${TAG_NAME}"
|
||||||
|
|||||||
@@ -12,11 +12,7 @@ export function getURL(org: string, repo: string, api: string): string {
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getLatestVersion(
|
export async function getLatestVersion(org: string, repo: string, api: string): Promise<string> {
|
||||||
org: string,
|
|
||||||
repo: string,
|
|
||||||
api: string
|
|
||||||
): Promise<string> {
|
|
||||||
const url = getURL(org, repo, api);
|
const url = getURL(org, repo, api);
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
export default function getURL(
|
export default function getURL(os: string, extended: string, version: string): string {
|
||||||
os: string,
|
|
||||||
extended: string,
|
|
||||||
version: string
|
|
||||||
): string {
|
|
||||||
const extendedStr = (extended: string): string => {
|
const extendedStr = (extended: string): string => {
|
||||||
if (extended === 'true') {
|
if (extended === 'true') {
|
||||||
return 'extended_';
|
return 'extended_';
|
||||||
|
|||||||
@@ -59,16 +59,10 @@ export async function installer(version: string): Promise<void> {
|
|||||||
const toolAssets: string = await tc.downloadTool(toolURL);
|
const toolAssets: string = await tc.downloadTool(toolURL);
|
||||||
let toolBin = '';
|
let toolBin = '';
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
const toolExtractedFolder: string = await tc.extractZip(
|
const toolExtractedFolder: string = await tc.extractZip(toolAssets, tempDir);
|
||||||
toolAssets,
|
|
||||||
tempDir
|
|
||||||
);
|
|
||||||
toolBin = `${toolExtractedFolder}/${Tool.CmdName}.exe`;
|
toolBin = `${toolExtractedFolder}/${Tool.CmdName}.exe`;
|
||||||
} else {
|
} else {
|
||||||
const toolExtractedFolder: string = await tc.extractTar(
|
const toolExtractedFolder: string = await tc.extractTar(toolAssets, tempDir);
|
||||||
toolAssets,
|
|
||||||
tempDir
|
|
||||||
);
|
|
||||||
toolBin = `${toolExtractedFolder}/${Tool.CmdName}`;
|
toolBin = `${toolExtractedFolder}/${Tool.CmdName}`;
|
||||||
}
|
}
|
||||||
await io.mv(toolBin, binDir);
|
await io.mv(toolBin, binDir);
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ export interface ActionResult {
|
|||||||
output: string;
|
output: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function showVersion(
|
export async function showVersion(cmd: string, args: string[]): Promise<ActionResult> {
|
||||||
cmd: string,
|
|
||||||
args: string[]
|
|
||||||
): Promise<ActionResult> {
|
|
||||||
const result: ActionResult = {
|
const result: ActionResult = {
|
||||||
exitcode: 0,
|
exitcode: 0,
|
||||||
output: ''
|
output: ''
|
||||||
|
|||||||
Reference in New Issue
Block a user