mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 12:22:17 +01:00
Compare commits
137 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb23a85c9f | ||
|
|
b30237c8ce | ||
|
|
4cd0877e87 | ||
|
|
b71ad2d014 | ||
|
|
e470a760d3 | ||
|
|
1649bea4d0 | ||
|
|
a2600d572b | ||
|
|
1bafab6d5a | ||
|
|
601b110315 | ||
|
|
c1f369064c | ||
|
|
8cd28fc857 | ||
|
|
702a3e4c9a | ||
|
|
d7620db17f | ||
|
|
64135da123 | ||
|
|
35eb187a3c | ||
|
|
c3a324ff3c | ||
|
|
9b11300647 | ||
|
|
6bed4121ee | ||
|
|
b9b88c049f | ||
|
|
da65b73f4d | ||
|
|
33d3f73fc7 | ||
|
|
a3f7ea4140 | ||
|
|
61937d118f | ||
|
|
88076695a9 | ||
|
|
2935a38e76 | ||
|
|
c69c549ff8 | ||
|
|
9cdeeef2f3 | ||
|
|
7c9a227529 | ||
|
|
514a588dc1 | ||
|
|
ea7a8f0343 | ||
|
|
de4f7b1136 | ||
|
|
0d2e11837b | ||
|
|
703c21fa41 | ||
|
|
844e33d410 | ||
|
|
3d71d2403d | ||
|
|
c6512d44a3 | ||
|
|
d17d5099d6 | ||
|
|
61f1757c8c | ||
|
|
f9fbf81b0c | ||
|
|
cc6e8832e8 | ||
|
|
0a1c87ea74 | ||
|
|
4ce8f62edb | ||
|
|
f48589d80e | ||
|
|
9026a94533 | ||
|
|
c430dcefd1 | ||
|
|
bc46e4063a | ||
|
|
6eb91d4870 | ||
|
|
df77f4d6bd | ||
|
|
bbb82a999a | ||
|
|
1972405991 | ||
|
|
ef069a5b5b | ||
|
|
cb4de30fad | ||
|
|
a8e5979167 | ||
|
|
5fcc41dbee | ||
|
|
bb9d9fa49a | ||
|
|
88ecc3f3da | ||
|
|
41b2600c91 | ||
|
|
4eed9e4759 | ||
|
|
81b5611b7c | ||
|
|
231e402918 | ||
|
|
4de9b09ee4 | ||
|
|
45ee73c48d | ||
|
|
75c9bc6dc7 | ||
|
|
f3bcf96547 | ||
|
|
2331ecd733 | ||
|
|
266cd0f351 | ||
|
|
4a12696aca | ||
|
|
07c50afccc | ||
|
|
9d826a479b | ||
|
|
d56d87baca | ||
|
|
6b6e84ed73 | ||
|
|
8095fcb0f4 | ||
|
|
f802d7f38d | ||
|
|
8850dd5d86 | ||
|
|
da0b7ac273 | ||
|
|
b9e10c3e30 | ||
|
|
38f8dc8ba8 | ||
|
|
0dd325e0bc | ||
|
|
e35c200d21 | ||
|
|
1710cea6fb | ||
|
|
3907220f13 | ||
|
|
747598e8dc | ||
|
|
022950c85b | ||
|
|
e375f4fff3 | ||
|
|
ac7a2d661b | ||
|
|
40cba97ea7 | ||
|
|
e8c9424357 | ||
|
|
aa532f2f96 | ||
|
|
24f14e4ba9 | ||
|
|
2fb0c15ce0 | ||
|
|
f18cf68aea | ||
|
|
aed27b9707 | ||
|
|
4f359ec551 | ||
|
|
a9aa73f7b4 | ||
|
|
aeba6547bb | ||
|
|
8eef9fcb44 | ||
|
|
3cb9216401 | ||
|
|
20ff13abbd | ||
|
|
6812c21f18 | ||
|
|
a1b1127907 | ||
|
|
02c90246b4 | ||
|
|
5000d1a8b6 | ||
|
|
63038f397f | ||
|
|
7e8dab4a15 | ||
|
|
8f4af8fa35 | ||
|
|
b8b4d74381 | ||
|
|
94853340b9 | ||
|
|
de65f3e128 | ||
|
|
c00fd7be83 | ||
|
|
7c0de2ddec | ||
|
|
236f382aa6 | ||
|
|
1bb54b05c8 | ||
|
|
b28afd97fa | ||
|
|
46a6a3afdf | ||
|
|
6e5afb7c2e | ||
|
|
737fda5741 | ||
|
|
c58f4ce12d | ||
|
|
95afbe8abf | ||
|
|
8f7332cde6 | ||
|
|
699805b6e1 | ||
|
|
2550d0ecb0 | ||
|
|
692ded2284 | ||
|
|
e9732216ce | ||
|
|
3315ca857b | ||
|
|
8d85402748 | ||
|
|
b4a0e8ba60 | ||
|
|
66d664bedd | ||
|
|
87e38e224d | ||
|
|
4fb2901627 | ||
|
|
7a50ddc694 | ||
|
|
b55f1c81fb | ||
|
|
0311892edd | ||
|
|
94ce32ea1b | ||
|
|
3317963a65 | ||
|
|
a79f520add | ||
|
|
b6a7551978 | ||
|
|
490ff3b995 |
@@ -2,7 +2,7 @@ version: 1
|
|||||||
update_configs:
|
update_configs:
|
||||||
- package_manager: "javascript"
|
- package_manager: "javascript"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
update_schedule: "weekly"
|
update_schedule: "live"
|
||||||
default_labels:
|
default_labels:
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
commit_message:
|
commit_message:
|
||||||
|
|||||||
@@ -1,7 +1,2 @@
|
|||||||
.*
|
.*
|
||||||
|
*
|
||||||
!.eslintrc.json
|
|
||||||
!.prettierrc.json
|
|
||||||
|
|
||||||
coverage
|
|
||||||
node_modules
|
|
||||||
|
|||||||
@@ -7,3 +7,7 @@ indent_size = 2
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = tab
|
||||||
|
|||||||
37
.github/workflows/dev-image.yml
vendored
Normal file
37
.github/workflows/dev-image.yml
vendored
Normal 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
|
||||||
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
@@ -3,13 +3,12 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
@@ -17,17 +16,10 @@ jobs:
|
|||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
run: echo "${GITHUB_CONTEXT}"
|
run: echo "${GITHUB_CONTEXT}"
|
||||||
|
|
||||||
- name: Install hub
|
- name: Install github/hub
|
||||||
run: |
|
run: |
|
||||||
HUB_VERSION="2.13.0"
|
export HUB_VERSION="2.14.2"
|
||||||
HUB_NAME="hub-linux-amd64-${HUB_VERSION}"
|
curl -fsSL https://github.com/github/hub/raw/8d91904208171b013f9a9d1175f4ab39068db047/script/get | bash -s "${HUB_VERSION}"
|
||||||
HUB_TARBALL="${HUB_NAME}.tgz"
|
|
||||||
wget -q "https://github.com/github/hub/releases/download/v${HUB_VERSION}/${HUB_TARBALL}"
|
|
||||||
tar -zxvf "./${HUB_TARBALL}"
|
|
||||||
mkdir ~/bin
|
|
||||||
cp "./${HUB_NAME}/bin/hub" ~/bin/
|
|
||||||
echo "::add-path::~/bin/"
|
|
||||||
rm -rf "./${HUB_NAME}" "./${HUB_TARBALL}"
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
env:
|
env:
|
||||||
@@ -35,8 +27,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
TAG_NAME="${GITHUB_REF##refs/tags/}"
|
TAG_NAME="${GITHUB_REF##refs/tags/}"
|
||||||
echo "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details." > ./release_notes.md
|
echo "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details." > ./release_notes.md
|
||||||
sed -i "1iRelease ${TAG_NAME}\n" ./release_notes.md
|
RELEASE_NAME="$(jq -r '.name' ./package.json)"
|
||||||
hub release create \
|
sed -i "1i${RELEASE_NAME} ${TAG_NAME}\n" ./release_notes.md
|
||||||
|
./bin/hub release create \
|
||||||
--draft \
|
--draft \
|
||||||
--prerelease \
|
--prerelease \
|
||||||
--file ./release_notes.md \
|
--file ./release_notes.md \
|
||||||
|
|||||||
7
.github/workflows/test-action.yml
vendored
7
.github/workflows/test-action.yml
vendored
@@ -30,4 +30,9 @@ jobs:
|
|||||||
hugo-version: ${{ matrix.hugo-version }}
|
hugo-version: ${{ matrix.hugo-version }}
|
||||||
extended: ${{ matrix.extended }}
|
extended: ${{ matrix.extended }}
|
||||||
|
|
||||||
- run: hugo version
|
- name: Run hugo version
|
||||||
|
run: echo "::set-output name=hugo_version::$(hugo version)"
|
||||||
|
id: hugo_version
|
||||||
|
|
||||||
|
- name: '${{ steps.hugo_version.outputs.hugo_version }}'
|
||||||
|
run: echo '${{ steps.hugo_version.outputs.hugo_version }}'
|
||||||
|
|||||||
22
.github/workflows/test.yml
vendored
22
.github/workflows/test.yml
vendored
@@ -76,14 +76,18 @@ jobs:
|
|||||||
name: coverage
|
name: coverage
|
||||||
path: coverage
|
path: coverage
|
||||||
|
|
||||||
- name: Upload test coverage to Coveralls
|
- uses: codecov/codecov-action@v1
|
||||||
uses: coverallsapp/github-action@v1.0.1
|
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
parallel: true
|
|
||||||
|
|
||||||
- name: Coveralls Finished
|
# - name: Upload test coverage to Coveralls
|
||||||
uses: coverallsapp/github-action@v1.0.1
|
# uses: coverallsapp/github-action@v1.0.1
|
||||||
with:
|
# with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
parallel-finished: true
|
# parallel: true
|
||||||
|
|
||||||
|
# - name: Coveralls Finished
|
||||||
|
# uses: coverallsapp/github-action@v1.0.1
|
||||||
|
# with:
|
||||||
|
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# parallel-finished: true
|
||||||
|
|||||||
217
CHANGELOG.md
217
CHANGELOG.md
@@ -2,6 +2,223 @@
|
|||||||
|
|
||||||
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.8](https://github.com/peaceiris/actions-hugo/compare/v2.4.7...v2.4.8) (2020-03-27)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* Add workflow for developing container (#231) ([b71ad2d](https://github.com/peaceiris/actions-hugo/commit/b71ad2d01404ec9d8cf12979cca37d47310e9aa7)), closes [#231](https://github.com/peaceiris/actions-hugo/issues/231)
|
||||||
|
* set update_schedule live ([61937d1](https://github.com/peaceiris/actions-hugo/commit/61937d118fd2de55dd288ee18edabb0e9f9d11e0))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @types/node from 12.12.30 to 12.12.31 ([64135da](https://github.com/peaceiris/actions-hugo/commit/64135da123255189740dea81571630c0d8fcf7e7))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.23.0 to 2.24.0 ([2935a38](https://github.com/peaceiris/actions-hugo/commit/2935a38e763ed8cd23c43ba95236eeb811f659f9))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.24.0 to 2.25.0 ([b9b88c0](https://github.com/peaceiris/actions-hugo/commit/b9b88c049f68fdd1e11e50212923d07eb22967e1))
|
||||||
|
* bump @typescript-eslint/parser from 2.23.0 to 2.24.0 (#213) ([8807669](https://github.com/peaceiris/actions-hugo/commit/88076695a918ea1419ddeec9e16ba30e9faf4134)), closes [#213](https://github.com/peaceiris/actions-hugo/issues/213)
|
||||||
|
* bump @typescript-eslint/parser from 2.24.0 to 2.25.0 ([6bed412](https://github.com/peaceiris/actions-hugo/commit/6bed4121ee5d7bd8a3e22c856261b59b442f8193))
|
||||||
|
* bump @zeit/ncc from 0.21.1 to 0.22.0 ([c3a324f](https://github.com/peaceiris/actions-hugo/commit/c3a324ff3cf3e1b975c594d266ba4c7bd09daa19))
|
||||||
|
* bump jest from 25.1.0 to 25.2.0 ([d7620db](https://github.com/peaceiris/actions-hugo/commit/d7620db17f5b0b91867f71d01874a879651a727b))
|
||||||
|
* bump jest from 25.2.0 to 25.2.1 ([8cd28fc](https://github.com/peaceiris/actions-hugo/commit/8cd28fc857360a781d9ebd7103da74c17d4a2ce7))
|
||||||
|
* bump jest from 25.2.1 to 25.2.2 ([601b110](https://github.com/peaceiris/actions-hugo/commit/601b110315ada15bc46842682625b71a0be1902c))
|
||||||
|
* bump jest from 25.2.2 to 25.2.3 ([1649bea](https://github.com/peaceiris/actions-hugo/commit/1649bea4d0a67e4b6af6ed2b95fea1e66673239b))
|
||||||
|
* bump jest-circus from 25.1.0 to 25.2.0 ([702a3e4](https://github.com/peaceiris/actions-hugo/commit/702a3e4c9ae5cf3ce9e380e45504d2b28e0dcc46))
|
||||||
|
* bump jest-circus from 25.2.0 to 25.2.1 ([c1f3690](https://github.com/peaceiris/actions-hugo/commit/c1f369064cf05c10277655226e2a4723266d7161))
|
||||||
|
* bump jest-circus from 25.2.1 to 25.2.2 ([1bafab6](https://github.com/peaceiris/actions-hugo/commit/1bafab6d5aa5d524d86e28cf6bcb8c41a09cc51d))
|
||||||
|
* bump jest-circus from 25.2.2 to 25.2.3 ([a2600d5](https://github.com/peaceiris/actions-hugo/commit/a2600d572b522fb75cd38aba6b6306501618579d))
|
||||||
|
* bump lint-staged from 10.0.8 to 10.0.9 ([35eb187](https://github.com/peaceiris/actions-hugo/commit/35eb187a3cd1e2b3370f881bfc97396d483585f8))
|
||||||
|
* bump nock from 12.0.2 to 12.0.3 ([a3f7ea4](https://github.com/peaceiris/actions-hugo/commit/a3f7ea4140f3f85196f7ea5d76bd2eeb5524a646))
|
||||||
|
* bump prettier from 1.19.1 to 2.0.1 ([da65b73](https://github.com/peaceiris/actions-hugo/commit/da65b73f4d4d3f23a392b882cb81c6538dda23b0))
|
||||||
|
* bump prettier from 2.0.1 to 2.0.2 ([9b11300](https://github.com/peaceiris/actions-hugo/commit/9b11300647ddf5ce6c42733e335be78e5ae855b6))
|
||||||
|
* node from 12.15.0 to 12.16.1 (#232) ([e470a76](https://github.com/peaceiris/actions-hugo/commit/e470a760d3eda16dddba7bcf4c66a3ae371c61f2)), closes [#232](https://github.com/peaceiris/actions-hugo/issues/232)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* Add codeclimate badge ([c69c549](https://github.com/peaceiris/actions-hugo/commit/c69c549ff8c5106c435657fba74f76cb807db1ec))
|
||||||
|
* bump actions/checkout to v2 ([33d3f73](https://github.com/peaceiris/actions-hugo/commit/33d3f73fc7bb54a2fe21cdeee8e93881c3094b92))
|
||||||
|
* update notes ([4cd0877](https://github.com/peaceiris/actions-hugo/commit/4cd0877e8793c755e53b341fa5fe43801f9319a2))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.7](https://github.com/peaceiris/actions-hugo/compare/v2.4.6...v2.4.7) (2020-03-13)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* update script link [skip ci] ([3d71d24](https://github.com/peaceiris/actions-hugo/commit/3d71d2403d36fe0c2770d1a69526ca5d8ba884c5))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* [security] bump acorn from 6.4.0 to 6.4.1 ([ea7a8f0](https://github.com/peaceiris/actions-hugo/commit/ea7a8f03436f5eefe2b0509210f62bb60eb645ce))
|
||||||
|
* bump @actions/core from 1.2.2 to 1.2.3 ([cc6e883](https://github.com/peaceiris/actions-hugo/commit/cc6e8832e8df3d38ea15016148e7499d67595412))
|
||||||
|
* bump @actions/tool-cache from 1.3.1 to 1.3.2 ([c6512d4](https://github.com/peaceiris/actions-hugo/commit/c6512d44a3620fbc3158c62e47d6a3e1a8a0696d))
|
||||||
|
* bump @actions/tool-cache from 1.3.2 to 1.3.3 ([0d2e118](https://github.com/peaceiris/actions-hugo/commit/0d2e11837b439e036687b3766548fe67efe14e04))
|
||||||
|
* bump @types/jest from 25.1.3 to 25.1.4 ([d17d509](https://github.com/peaceiris/actions-hugo/commit/d17d5099d67ed8aca0af28f612ffa36a2751b013))
|
||||||
|
* bump @types/node from 12.12.28 to 12.12.29 ([bc46e40](https://github.com/peaceiris/actions-hugo/commit/bc46e4063a096f87cc0faaf107b160c4686b9462))
|
||||||
|
* bump @types/node from 12.12.29 to 12.12.30 ([de4f7b1](https://github.com/peaceiris/actions-hugo/commit/de4f7b11367e07ace82f9ada91775cfbb03b88da))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.21.0 to 2.22.0 ([4ce8f62](https://github.com/peaceiris/actions-hugo/commit/4ce8f62edb9e86b50989996e17b6a8ed20b30a4b))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.22.0 to 2.23.0 ([844e33d](https://github.com/peaceiris/actions-hugo/commit/844e33d4107bfb7ab1cc21f6a4fab8b51bf441b1))
|
||||||
|
* bump @typescript-eslint/parser from 2.21.0 to 2.22.0 ([0a1c87e](https://github.com/peaceiris/actions-hugo/commit/0a1c87ea74e0cdf3a147e464f7814576f07a46bf))
|
||||||
|
* bump @typescript-eslint/parser from 2.22.0 to 2.23.0 ([703c21f](https://github.com/peaceiris/actions-hugo/commit/703c21fa41ab2b6f1c71a6bdbc4f795eff75abea))
|
||||||
|
* bump eslint-plugin-jest from 23.8.0 to 23.8.1 (#198) ([f48589d](https://github.com/peaceiris/actions-hugo/commit/f48589d80e2cf825cef0479d547f2767a2bf9414)), closes [#198](https://github.com/peaceiris/actions-hugo/issues/198)
|
||||||
|
* bump eslint-plugin-jest from 23.8.1 to 23.8.2 ([f9fbf81](https://github.com/peaceiris/actions-hugo/commit/f9fbf81b0c07b5293e596585fc22b49e40d818ec))
|
||||||
|
* bump hub 2.14.1 to 2.14.2 ([61f1757](https://github.com/peaceiris/actions-hugo/commit/61f1757c8c728f8fd8e8e96f56b81171e007ef28))
|
||||||
|
* bump nock from 12.0.1 to 12.0.2 ([c430dce](https://github.com/peaceiris/actions-hugo/commit/c430dcefd1e96d100f28c2a8e5b5084a84fe2c0d))
|
||||||
|
* bump typescript from 3.8.2 to 3.8.3 ([9026a94](https://github.com/peaceiris/actions-hugo/commit/9026a9453330ef8189b318c2339c250ea05c5947))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.6](https://github.com/peaceiris/actions-hugo/compare/v2.4.5...v2.4.6) (2020-02-26)
|
||||||
|
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @types/jest from 25.1.1 to 25.1.2 ([da0b7ac](https://github.com/peaceiris/actions-hugo/commit/da0b7ac273fb7fc345e8a98c58e620b7f85df2f5))
|
||||||
|
* bump @types/jest from 25.1.2 to 25.1.3 ([45ee73c](https://github.com/peaceiris/actions-hugo/commit/45ee73c48da3bd070b8e8a1f9bfed354e6e50c82))
|
||||||
|
* bump @types/node from 12.12.27 to 12.12.28 ([4eed9e4](https://github.com/peaceiris/actions-hugo/commit/4eed9e47590cb859dcc19bd396d1360b45813dda))
|
||||||
|
* bump @types/node from 13.7.0 to 13.7.1 ([9d826a4](https://github.com/peaceiris/actions-hugo/commit/9d826a479b558de962af26211fc1a3e2ae6d7b92))
|
||||||
|
* bump @types/node from 13.7.1 to 13.7.2 ([f3bcf96](https://github.com/peaceiris/actions-hugo/commit/f3bcf965479d21716fcdb4c6b459562b13892a4a))
|
||||||
|
* bump @types/node-fetch from 2.5.4 to 2.5.5 ([a8e5979](https://github.com/peaceiris/actions-hugo/commit/a8e5979167c907a9253458eb96b7b3281f055722))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.19.0 to 2.19.2 ([d56d87b](https://github.com/peaceiris/actions-hugo/commit/d56d87baca65a2ba667e218745e6409fc8ad6fcf))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.19.2 to 2.20.0 ([266cd0f](https://github.com/peaceiris/actions-hugo/commit/266cd0f3511e7ae5949d408a7374f7cf418420cd))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.20.0 to 2.21.0 ([5fcc41d](https://github.com/peaceiris/actions-hugo/commit/5fcc41dbee64328185c1450e01b5ec5c7bb7e7e8))
|
||||||
|
* bump @typescript-eslint/parser from 2.19.0 to 2.19.2 ([6b6e84e](https://github.com/peaceiris/actions-hugo/commit/6b6e84ed73751418f2c94fe50e135960082c51af))
|
||||||
|
* bump @typescript-eslint/parser from 2.19.2 to 2.20.0 ([2331ecd](https://github.com/peaceiris/actions-hugo/commit/2331ecd7332e9b1d816565a6faecf4b1f0e3f0d2))
|
||||||
|
* bump @typescript-eslint/parser from 2.20.0 to 2.21.0 ([bb9d9fa](https://github.com/peaceiris/actions-hugo/commit/bb9d9fa49a8dde93d1121211f8fe140c6f85794d))
|
||||||
|
* bump @zeit/ncc from 0.21.0 to 0.21.1 ([ef069a5](https://github.com/peaceiris/actions-hugo/commit/ef069a5b5b3305eebd68c97222f27a4b7eff8187))
|
||||||
|
* bump eslint-plugin-jest from 23.6.0 to 23.7.0 ([f802d7f](https://github.com/peaceiris/actions-hugo/commit/f802d7f38d757aa9d19596ede8783cc21687fc0d))
|
||||||
|
* bump eslint-plugin-jest from 23.7.0 to 23.8.0 ([cb4de30](https://github.com/peaceiris/actions-hugo/commit/cb4de30fad3d0414055024a3a0d460b1e8ec39ec))
|
||||||
|
* bump husky from 4.2.1 to 4.2.3 ([07c50af](https://github.com/peaceiris/actions-hugo/commit/07c50afccc821b24526b6c6257f65ba17a4bb727))
|
||||||
|
* bump lint-staged from 10.0.7 to 10.0.8 ([1972405](https://github.com/peaceiris/actions-hugo/commit/1972405991185de2af9d20fcf69786268e52039c))
|
||||||
|
* bump nock from 11.7.2 to 11.8.2 ([8095fcb](https://github.com/peaceiris/actions-hugo/commit/8095fcb0f41d1541ef1d84e019cb67f9e9595e85))
|
||||||
|
* bump nock from 11.8.2 to 12.0.0 ([4a12696](https://github.com/peaceiris/actions-hugo/commit/4a12696aca76ef260d0b7a55d1290c2b778ddfdb))
|
||||||
|
* bump nock from 12.0.0 to 12.0.1 ([231e402](https://github.com/peaceiris/actions-hugo/commit/231e4029187d257cc58b840ed341257b4b20e288))
|
||||||
|
* bump node from 12.14.1 to 12.15.0 (#172) ([8850dd5](https://github.com/peaceiris/actions-hugo/commit/8850dd5d86b98f7f80c761547cd73ce9df779127)), closes [#172](https://github.com/peaceiris/actions-hugo/issues/172)
|
||||||
|
* bump ts-jest from 25.2.0 to 25.2.1 ([4de9b09](https://github.com/peaceiris/actions-hugo/commit/4de9b09ee49dc89ca2d9a914f99020b6392580eb))
|
||||||
|
* bump typescript from 3.7.5 to 3.8.2 ([81b5611](https://github.com/peaceiris/actions-hugo/commit/81b5611b7c835dabe63ae1700be5719f276debf4))
|
||||||
|
* Rollback types/node 13 to 12 (#185) ([75c9bc6](https://github.com/peaceiris/actions-hugo/commit/75c9bc6dc7f95893877154254cd001d8b5ebe76a)), closes [#185](https://github.com/peaceiris/actions-hugo/issues/185)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* Add note about actions/checkout@v2 ([b9e10c3](https://github.com/peaceiris/actions-hugo/commit/b9e10c3e30353f050fbad487660f9dd198c32662))
|
||||||
|
* update ([88ecc3f](https://github.com/peaceiris/actions-hugo/commit/88ecc3f3da2d10d3aa78000a27da4490493e81cb))
|
||||||
|
* use github_token ([41b2600](https://github.com/peaceiris/actions-hugo/commit/41b2600c915a0e5a3e0b2fc0fa178e65e311152a))
|
||||||
|
* use peaceiris/actions-gh-pages@v3 ([38f8dc8](https://github.com/peaceiris/actions-hugo/commit/38f8dc8ba89e5b6143d0c921b049481c011aa0a7))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.5](https://github.com/peaceiris/actions-hugo/compare/v2.4.4...v2.4.5) (2020-02-04)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* Add engines field ([aeba654](https://github.com/peaceiris/actions-hugo/commit/aeba6547bbb28e39b29e7d03f6978c80d6c09931))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @types/jest from 25.1.0 to 25.1.1 ([f18cf68](https://github.com/peaceiris/actions-hugo/commit/f18cf68aea6a7d00504e6335efedb30a14f8c021))
|
||||||
|
* bump @types/node from 13.5.0 to 13.5.1 ([a9aa73f](https://github.com/peaceiris/actions-hugo/commit/a9aa73f7b42aadd8e6bbbf77ad51143b99f18e40))
|
||||||
|
* bump @types/node from 13.5.1 to 13.5.2 ([aed27b9](https://github.com/peaceiris/actions-hugo/commit/aed27b97077aed97ef3c9e27ee7066a5a7a55c40))
|
||||||
|
* bump @types/node from 13.5.2 to 13.5.3 ([e8c9424](https://github.com/peaceiris/actions-hugo/commit/e8c9424357a611602420145f8f289752b2521863))
|
||||||
|
* bump @types/node from 13.5.3 to 13.7.0 ([e375f4f](https://github.com/peaceiris/actions-hugo/commit/e375f4fff3fc25ace239150a37912746292b4e67))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.18.0 to 2.19.0 ([3907220](https://github.com/peaceiris/actions-hugo/commit/3907220f13b04e23a4d300439cdc11b05ea034c1))
|
||||||
|
* bump @typescript-eslint/parser from 2.18.0 to 2.19.0 (#170) ([747598e](https://github.com/peaceiris/actions-hugo/commit/747598e8dc8f2f8ea8c3a8964531e3c7fa1b11d7)), closes [#170](https://github.com/peaceiris/actions-hugo/issues/170)
|
||||||
|
* bump lint-staged from 10.0.3 to 10.0.4 ([4f359ec](https://github.com/peaceiris/actions-hugo/commit/4f359ec551fa404b81d7a5832b16a3729874c611))
|
||||||
|
* bump lint-staged from 10.0.4 to 10.0.5 ([2fb0c15](https://github.com/peaceiris/actions-hugo/commit/2fb0c15ce023c9b4831e1acab7d97c0ba50d5a9d))
|
||||||
|
* bump lint-staged from 10.0.5 to 10.0.6 ([aa532f2](https://github.com/peaceiris/actions-hugo/commit/aa532f2f962cb4c9473f59fd4adbf67f4bfc3554))
|
||||||
|
* bump lint-staged from 10.0.6 to 10.0.7 ([ac7a2d6](https://github.com/peaceiris/actions-hugo/commit/ac7a2d661b0cb2b28f9967e2c65567f3b6ef9abc))
|
||||||
|
* bump ts-jest from 25.0.0 to 25.1.0 ([24f14e4](https://github.com/peaceiris/actions-hugo/commit/24f14e4ba907ee0920a608a0cf204387f1a26d53))
|
||||||
|
* bump ts-jest from 25.1.0 to 25.2.0 ([022950c](https://github.com/peaceiris/actions-hugo/commit/022950c85b46b0e873e66b5d6732b02ea09aa566))
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* add Dependabot badge ([40cba97](https://github.com/peaceiris/actions-hugo/commit/40cba97ea7d81fcbaccd754f9d4e2f28db6afbf3))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.4](https://github.com/peaceiris/actions-hugo/compare/v2.4.3...v2.4.4) (2020-01-28)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* ignore failure ([7c0de2d](https://github.com/peaceiris/actions-hugo/commit/7c0de2ddec0ad6a617eed9a78836b75151c9f870))
|
||||||
|
* update git (#150) ([c00fd7b](https://github.com/peaceiris/actions-hugo/commit/c00fd7be83dad02c1e07a09bfb526a3e2d67fa75)), closes [#150](https://github.com/peaceiris/actions-hugo/issues/150)
|
||||||
|
* update name ([8f4af8f](https://github.com/peaceiris/actions-hugo/commit/8f4af8fa35a55337783683108d969c57a9541dae))
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* remove operations-per-run ([de65f3e](https://github.com/peaceiris/actions-hugo/commit/de65f3e1283667e67fe0676a6498d02951ee22d5))
|
||||||
|
* use github/hub install script [skip ci] ([7e8dab4](https://github.com/peaceiris/actions-hugo/commit/7e8dab4a1585bb1241a44c53eeae4acc25fe0661))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @types/jest from 24.9.1 to 25.1.0 ([02c9024](https://github.com/peaceiris/actions-hugo/commit/02c90246b441e21119ffe228b29c43ac443ca688))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.17.0 to 2.18.0 ([a1b1127](https://github.com/peaceiris/actions-hugo/commit/a1b1127907729bf5a7533f63111feaf16919ee1b))
|
||||||
|
* bump @typescript-eslint/parser from 2.17.0 to 2.18.0 ([6812c21](https://github.com/peaceiris/actions-hugo/commit/6812c21f1895dbef58aca3a976d0d3852d660dd0))
|
||||||
|
* bump lint-staged from 10.0.2 to 10.0.3 ([5000d1a](https://github.com/peaceiris/actions-hugo/commit/5000d1a8b64a136a7350b3f3debc93fb21872a06))
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* Add release feed badge ([b8b4d74](https://github.com/peaceiris/actions-hugo/commit/b8b4d743819166af3ff7f530bbdc6d3480913cb9))
|
||||||
|
* update badge ([63038f3](https://github.com/peaceiris/actions-hugo/commit/63038f397f199600101c79aca6bc505c8718d1b7))
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* action failure status (#151) ([9485334](https://github.com/peaceiris/actions-hugo/commit/94853340b9510c41a18016dbaa8d41e42044300c)), closes [#151](https://github.com/peaceiris/actions-hugo/issues/151) [#149](https://github.com/peaceiris/actions-hugo/issues/149)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.3](https://github.com/peaceiris/actions-hugo/compare/v2.4.2...v2.4.3) (2020-01-24)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* Change update_schedule from weekly to daily ([737fda5](https://github.com/peaceiris/actions-hugo/commit/737fda5741cb12d8992d4c75e249bd0392e162a7))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @actions/core from 1.2.1 to 1.2.2 ([6e5afb7](https://github.com/peaceiris/actions-hugo/commit/6e5afb7c2e3739813acca54db234f1c13cf1e596))
|
||||||
|
* bump @actions/tool-cache from 1.3.0 to 1.3.1 ([46a6a3a](https://github.com/peaceiris/actions-hugo/commit/46a6a3afdff838a10f9f9e063170cfc02c197611))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.2](https://github.com/peaceiris/actions-hugo/compare/v2.4.1...v2.4.2) (2020-01-23)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* Add codecov/codecov-action@v1 (#136) ([94ce32e](https://github.com/peaceiris/actions-hugo/commit/94ce32ea1b2965037ef7bbec618476ed6ad7b9e6)), closes [#136](https://github.com/peaceiris/actions-hugo/issues/136)
|
||||||
|
* Add Hugo version dump step ([7a50ddc](https://github.com/peaceiris/actions-hugo/commit/7a50ddc6941e49c88a35080315a84a684c825347))
|
||||||
|
* Add operations-per-run 1 ([b6a7551](https://github.com/peaceiris/actions-hugo/commit/b6a75519788da01712462416009e656ec0b9cc8d))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @types/jest from 24.9.0 to 24.9.1 ([2550d0e](https://github.com/peaceiris/actions-hugo/commit/2550d0ecb023988fa8061c6270a46e9d67bb84dc))
|
||||||
|
* bump @types/node from 13.1.8 to 13.5.0 ([8d85402](https://github.com/peaceiris/actions-hugo/commit/8d854027489e6b4b9130701c3a826185aca6bfae))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.16.0 to 2.17.0 ([66d664b](https://github.com/peaceiris/actions-hugo/commit/66d664bedd9b4a5d5004dc4023557305c4d69d97))
|
||||||
|
* bump @typescript-eslint/parser from 2.16.0 to 2.17.0 (#144) ([692ded2](https://github.com/peaceiris/actions-hugo/commit/692ded22845285c58250414c6389365f01229c49)), closes [#144](https://github.com/peaceiris/actions-hugo/issues/144)
|
||||||
|
* bump husky from 4.0.10 to 4.2.1 ([e973221](https://github.com/peaceiris/actions-hugo/commit/e9732216ceb5db53dac31f61b0bb7d03db346f3a))
|
||||||
|
* bump jest and ts-jest ([3315ca8](https://github.com/peaceiris/actions-hugo/commit/3315ca857b7ee10f6c9de622898e44583fd81132))
|
||||||
|
* bump jest-circus from 24.9.0 to 25.1.0 ([b4a0e8b](https://github.com/peaceiris/actions-hugo/commit/b4a0e8ba604f9aeccee1f7b409870b3605de8544))
|
||||||
|
* bump lint-staged from 10.0.0 to 10.0.2 ([87e38e2](https://github.com/peaceiris/actions-hugo/commit/87e38e224d4a8f50a19dc9904c0bb85f707197bd))
|
||||||
|
* bump standard-version from 7.0.1 to 7.1.0 (#145) ([699805b](https://github.com/peaceiris/actions-hugo/commit/699805b6e156fb30665896aa7c1cbbca130a1364)), closes [#145](https://github.com/peaceiris/actions-hugo/issues/145)
|
||||||
|
* update ([3317963](https://github.com/peaceiris/actions-hugo/commit/3317963a656646a401fcf4d1420b50f5908e3be0))
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* Add Codecov badge ([0311892](https://github.com/peaceiris/actions-hugo/commit/0311892edd4e91aac6a95a003243e44ad3a54fe0))
|
||||||
|
* Update action execution time ([a79f520](https://github.com/peaceiris/actions-hugo/commit/a79f520addd8c317fcb9b29e8ecc4a8b0ecc43ae))
|
||||||
|
|
||||||
|
### style
|
||||||
|
|
||||||
|
* remove extra whitespace [skip ci] ([4fb2901](https://github.com/peaceiris/actions-hugo/commit/4fb290162762a7f823fcab1984966da8d8aed547))
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* Add fail to fetch latest due to 404 (#137) ([b55f1c8](https://github.com/peaceiris/actions-hugo/commit/b55f1c81fb24bc6149b3a7ec4cb9aa6c9596e877)), closes [#137](https://github.com/peaceiris/actions-hugo/issues/137)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.4.1](https://github.com/peaceiris/actions-hugo/compare/v2.4.0...v2.4.1) (2020-01-18)
|
## [2.4.1](https://github.com/peaceiris/actions-hugo/compare/v2.4.0...v2.4.1) (2020-01-18)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
ARG NODE_VERSION
|
||||||
|
|
||||||
|
FROM node:${NODE_VERSION}-buster-slim
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-l", "-c"]
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev autoconf \
|
||||||
|
ca-certificates \
|
||||||
|
wget && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /git
|
||||||
|
ENV GIT_VERSION="2.26.0"
|
||||||
|
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" && \
|
||||||
|
cd "./git-${GIT_VERSION}" && \
|
||||||
|
make configure && \
|
||||||
|
./configure --prefix=/usr && \
|
||||||
|
make all && \
|
||||||
|
make install
|
||||||
|
|
||||||
|
WORKDIR /repo
|
||||||
|
ENV RUNNER_TEMP="/tmp"
|
||||||
|
|
||||||
|
CMD [ "bash" ]
|
||||||
22
Makefile
22
Makefile
@@ -1,8 +1,10 @@
|
|||||||
cmd := "bash"
|
cmd := "bash"
|
||||||
msg := ""
|
msg := ""
|
||||||
IMAGE_NAME := actions-hugo-dev:latest
|
IMAGE_NAME := actions_hugo_dev:latest
|
||||||
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --file ./__tests__/Dockerfile
|
NODE_VERSION := $(shell cat ./.nvmrc)
|
||||||
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/etc/gitconfig $(IMAGE_NAME)
|
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
|
.PHONY: build
|
||||||
@@ -13,10 +15,18 @@ build:
|
|||||||
run:
|
run:
|
||||||
$(DOCKER_RUN) $(cmd)
|
$(DOCKER_RUN) $(cmd)
|
||||||
|
|
||||||
|
.PHONY: cirun
|
||||||
|
cirun:
|
||||||
|
$(DOCKER_RUN_CI) $(cmd)
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
$(DOCKER_RUN) npm test
|
$(DOCKER_RUN) npm test
|
||||||
|
|
||||||
.PHONY: commit
|
.PHONY: all
|
||||||
commit:
|
all:
|
||||||
$(DOCKER_RUN) git commit -m "$(msg)"
|
$(DOCKER_RUN) npm run all
|
||||||
|
|
||||||
|
.PHONY: ciall
|
||||||
|
ciall:
|
||||||
|
$(DOCKER_RUN_CI) npm run all
|
||||||
|
|||||||
40
README.md
40
README.md
@@ -1,9 +1,13 @@
|
|||||||
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
[](https://github.com/peaceiris/actions-hugo/blob/master/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://dependabot.com)
|
||||||
|
|
||||||
[](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
|
[](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
|
||||||
[](https://coveralls.io/github/peaceiris/actions-hugo?branch=master)
|
[](https://codecov.io/gh/peaceiris/actions-hugo)
|
||||||
|
[](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">
|
||||||
|
|
||||||
@@ -18,7 +22,7 @@ This **Hugo Setup Action** can install **Hugo** to a virtual machine of **GitHub
|
|||||||
|
|
||||||
From `v2`, this Hugo Setup Action has migrated to a JavaScript (TypeScript) action.
|
From `v2`, this Hugo Setup Action has migrated to a JavaScript (TypeScript) action.
|
||||||
We no longer build or pull a Hugo docker image.
|
We no longer build or pull a Hugo docker image.
|
||||||
Thanks to this change, we can complete this action less than **1 sec**.
|
Thanks to this change, we can complete this action in less than a few seconds.
|
||||||
(A docker base action was taking about 1 min or more execution time to build and pull a docker image.)
|
(A docker base action was taking about 1 min or more execution time to build and pull a docker image.)
|
||||||
|
|
||||||
| OS (runs-on) | ubuntu-18.04 | macos-latest | windows-2019 |
|
| OS (runs-on) | ubuntu-18.04 | macos-latest | windows-2019 |
|
||||||
@@ -75,12 +79,12 @@ on:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-deploy:
|
deploy:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
@@ -92,11 +96,10 @@ jobs:
|
|||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v2
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
env:
|
with:
|
||||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PUBLISH_BRANCH: gh-pages
|
publish_dir: ./public
|
||||||
PUBLISH_DIR: ./public
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<div align="right">
|
<div align="right">
|
||||||
@@ -218,19 +221,14 @@ The alpine base Hugo Docker image is provided on the following repository.
|
|||||||
|
|
||||||
## Maintainer Notes
|
## Maintainer Notes
|
||||||
|
|
||||||
Run `npm` and `git commit` commands on a container.
|
Run `npm test` on a Docker container.
|
||||||
|
|
||||||
**On Host**
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Docker
|
# On container
|
||||||
make build
|
make build
|
||||||
make run
|
make all
|
||||||
make run cmd="env"
|
|
||||||
make test
|
|
||||||
make commit msg="chore: Add Makefile"
|
|
||||||
|
|
||||||
# Release
|
# Release script on host
|
||||||
./release.sh
|
./release.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
FROM node:12-slim
|
|
||||||
|
|
||||||
WORKDIR /repo
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -y install --no-install-recommends \
|
|
||||||
git \
|
|
||||||
bash && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
CMD [ "bash" ]
|
|
||||||
@@ -3,25 +3,23 @@ import * as io from '@actions/io';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import nock from 'nock';
|
import nock from 'nock';
|
||||||
import {Tool, Action} from '../src/constants';
|
import {Tool, Action} from '../src/constants';
|
||||||
// import {FetchError} from 'node-fetch';
|
import {FetchError} from 'node-fetch';
|
||||||
import jsonTestBrew from './data/brew.json';
|
import jsonTestBrew from './data/brew.json';
|
||||||
// import jsonTestGithub from './data/github.json';
|
// import jsonTestGithub from './data/github.json';
|
||||||
|
|
||||||
jest.setTimeout(30000);
|
jest.setTimeout(30000);
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.resetModules();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
delete process.env['INPUT_HUGO-VERSION'];
|
|
||||||
nock.cleanAll();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Integration testing run()', () => {
|
describe('Integration testing run()', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
jest.resetModules();
|
||||||
|
});
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
const workDir = path.join(`${process.env.HOME}`, Action.WorkDirName);
|
const workDir = path.join(`${process.env.HOME}`, Action.WorkDirName);
|
||||||
await io.rmRF(workDir);
|
await io.rmRF(workDir);
|
||||||
|
|
||||||
|
delete process.env['INPUT_HUGO-VERSION'];
|
||||||
|
nock.cleanAll();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('succeed in installing a custom version', async () => {
|
test('succeed in installing a custom version', async () => {
|
||||||
@@ -69,6 +67,15 @@ describe('Integration testing run()', () => {
|
|||||||
);
|
);
|
||||||
expect(result.output).toMatch(`extended`);
|
expect(result.output).toMatch(`extended`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('fail to install the latest version due to 404 of brew', async () => {
|
||||||
|
process.env['INPUT_HUGO-VERSION'] = 'latest';
|
||||||
|
nock('https://formulae.brew.sh')
|
||||||
|
.get(`/api/formula/${Tool.Repo}.json`)
|
||||||
|
.reply(404);
|
||||||
|
|
||||||
|
await expect(main.run()).rejects.toThrowError(FetchError);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('showVersion()', () => {
|
describe('showVersion()', () => {
|
||||||
|
|||||||
853
lib/index.js
853
lib/index.js
File diff suppressed because it is too large
Load Diff
7714
package-lock.json
generated
7714
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
49
package.json
49
package.json
@@ -1,9 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "hugo-action",
|
"name": "actions-hugo",
|
||||||
"version": "2.4.1",
|
"version": "2.4.8",
|
||||||
"description": "GitHub Actions for Hugo",
|
"description": "GitHub Actions for Hugo",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.14.1",
|
||||||
|
"npm": ">=6.13.7"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"all": "npm run format:check && npm run lint && npm test",
|
||||||
"lint": "eslint ./{src,__tests__}/**/*.ts",
|
"lint": "eslint ./{src,__tests__}/**/*.ts",
|
||||||
"lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts",
|
"lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts",
|
||||||
"test": "jest --coverage --verbose",
|
"test": "jest --coverage --verbose",
|
||||||
@@ -24,9 +29,7 @@
|
|||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"src/**/*.ts": [
|
"src/**/*.ts": [
|
||||||
"prettier --check",
|
"prettier --check",
|
||||||
"eslint",
|
"eslint"
|
||||||
"jest --bail --findRelatedTests",
|
|
||||||
"git add"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -48,29 +51,29 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.1",
|
"@actions/core": "^1.2.3",
|
||||||
"@actions/exec": "^1.0.3",
|
"@actions/exec": "^1.0.3",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.3.0",
|
"@actions/tool-cache": "^1.3.3",
|
||||||
"node-fetch": "^2.6.0"
|
"node-fetch": "^2.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^24.9.0",
|
"@types/jest": "^25.1.4",
|
||||||
"@types/node": "^13.1.7",
|
"@types/node": "~12",
|
||||||
"@types/node-fetch": "^2.5.4",
|
"@types/node-fetch": "^2.5.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.16.0",
|
"@typescript-eslint/eslint-plugin": "^2.25.0",
|
||||||
"@typescript-eslint/parser": "^2.16.0",
|
"@typescript-eslint/parser": "^2.25.0",
|
||||||
"@zeit/ncc": "^0.21.0",
|
"@zeit/ncc": "^0.22.0",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-plugin-jest": "^23.6.0",
|
"eslint-plugin-jest": "^23.8.2",
|
||||||
"husky": "^4.0.10",
|
"husky": "^4.2.3",
|
||||||
"jest": "^24.9.0",
|
"jest": "^25.2.3",
|
||||||
"jest-circus": "^24.9.0",
|
"jest-circus": "^25.2.3",
|
||||||
"lint-staged": "^9.5.0",
|
"lint-staged": "^10.0.9",
|
||||||
"nock": "^11.7.2",
|
"nock": "^12.0.3",
|
||||||
"prettier": "1.19.1",
|
"prettier": "2.0.2",
|
||||||
"standard-version": "^7.0.1",
|
"standard-version": "^7.1.0",
|
||||||
"ts-jest": "^24.3.0",
|
"ts-jest": "^25.2.1",
|
||||||
"typescript": "^3.7.5"
|
"typescript": "^3.8.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ fi
|
|||||||
|
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git pull origin master
|
git pull origin master
|
||||||
git tag -d v2
|
git tag -d v2 || true
|
||||||
git pull origin --tags
|
git pull origin --tags
|
||||||
|
|
||||||
npm ci
|
npm ci
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
import * as core from '@actions/core';
|
||||||
import * as main from './main';
|
import * as main from './main';
|
||||||
|
|
||||||
main.run();
|
try {
|
||||||
|
main.run();
|
||||||
|
} catch (e) {
|
||||||
|
core.setFailed(`Action failed with error ${e}`);
|
||||||
|
}
|
||||||
|
|||||||
37
src/main.ts
37
src/main.ts
@@ -34,28 +34,23 @@ export async function showVersion(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function run(): Promise<ActionResult> {
|
export async function run(): Promise<ActionResult> {
|
||||||
try {
|
const toolVersion: string = core.getInput('hugo-version');
|
||||||
const toolVersion: string = core.getInput('hugo-version');
|
let installVersion = '';
|
||||||
let installVersion = '';
|
|
||||||
|
|
||||||
let result: ActionResult = {
|
let result: ActionResult = {
|
||||||
exitcode: 0,
|
exitcode: 0,
|
||||||
output: ''
|
output: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
if (toolVersion === '' || toolVersion === 'latest') {
|
if (toolVersion === '' || toolVersion === 'latest') {
|
||||||
installVersion = await getLatestVersion(Tool.Org, Tool.Repo, 'brew');
|
installVersion = await getLatestVersion(Tool.Org, Tool.Repo, 'brew');
|
||||||
} else {
|
} else {
|
||||||
installVersion = toolVersion;
|
installVersion = toolVersion;
|
||||||
}
|
|
||||||
|
|
||||||
core.info(`${Tool.Name} version: ${installVersion}`);
|
|
||||||
await installer(installVersion);
|
|
||||||
result = await showVersion(Tool.CmdName, [Tool.CmdOptVersion]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
} catch (e) {
|
|
||||||
core.setFailed(`Action failed with error ${e}`);
|
|
||||||
return e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.info(`${Tool.Name} version: ${installVersion}`);
|
||||||
|
await installer(installVersion);
|
||||||
|
result = await showVersion(Tool.CmdName, [Tool.CmdOptVersion]);
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user