mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 20:32:19 +01:00
Compare commits
143 Commits
v2.4.10
...
docker-com
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6d0e78500 | ||
|
|
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 | ||
|
|
6fca5e4b8e | ||
|
|
0ea1e4ebec | ||
|
|
54af4c1320 | ||
|
|
998d85162e | ||
|
|
c0e9f57fdb | ||
|
|
7160613349 | ||
|
|
41aa07a09a | ||
|
|
697e1b0bf9 | ||
|
|
0b3975d690 | ||
|
|
38bf1d20d0 | ||
|
|
4ec522dca3 | ||
|
|
914abda3d8 | ||
|
|
926e28de4a | ||
|
|
09cf94008e | ||
|
|
54205620ee | ||
|
|
b18493fdf7 | ||
|
|
2f831edb58 | ||
|
|
b99235e60e | ||
|
|
75e0d6c01d | ||
|
|
b5e2760b23 | ||
|
|
dcf08e2fd2 | ||
|
|
658d24bb3e | ||
|
|
e92a791bf3 | ||
|
|
533dde8575 | ||
|
|
aa5de43b2b | ||
|
|
f0d93788f5 | ||
|
|
07ef174ec4 | ||
|
|
71fe6dbc7f | ||
|
|
592603c7c2 | ||
|
|
0f35b33b73 | ||
|
|
b458469ce7 | ||
|
|
cb1a02bb35 | ||
|
|
ad41861beb | ||
|
|
cb3ccf6f42 | ||
|
|
2357c76e2a | ||
|
|
dd334074ce | ||
|
|
e3045c5fb5 | ||
|
|
8f166cf07e | ||
|
|
b920e249f6 | ||
|
|
ad8ddd743a | ||
|
|
16b12f7dfe | ||
|
|
89fc843efb | ||
|
|
d3ebe5d657 | ||
|
|
3c2f87a0bf | ||
|
|
b1d5e3fb14 | ||
|
|
98135d2cd0 | ||
|
|
271cee08e7 | ||
|
|
7e64f450a7 | ||
|
|
2cdb0da4de | ||
|
|
7d80e1641c | ||
|
|
dd37fe20fa | ||
|
|
e6a01917e0 | ||
|
|
9ba52187b5 | ||
|
|
4c11e4e48a | ||
|
|
66a332b429 | ||
|
|
012b11dba4 | ||
|
|
b555054157 | ||
|
|
c264525a0a | ||
|
|
9216be3bc0 | ||
|
|
8c661f7d9b | ||
|
|
07082d9e3b | ||
|
|
d7c46d09c9 | ||
|
|
ef0b1e0a85 | ||
|
|
312bc2c8e4 | ||
|
|
e4c9fb3020 | ||
|
|
73356f0ae5 | ||
|
|
0c93074aab | ||
|
|
dc79cf98c4 | ||
|
|
4271d65cba | ||
|
|
fc3f6e7cc9 | ||
|
|
b99a08a3b8 | ||
|
|
b92f084f45 | ||
|
|
11b6ba478c | ||
|
|
0b128ac232 | ||
|
|
55117bdfe7 | ||
|
|
b0c61036db | ||
|
|
9983819c7b | ||
|
|
466efd6e32 | ||
|
|
815ceae6cf | ||
|
|
02e6a28e7e | ||
|
|
aaaac3ae99 | ||
|
|
97168f4ffd | ||
|
|
b9569c27b6 | ||
|
|
ed2a699866 | ||
|
|
271b8c5d4e | ||
|
|
2aa39a0fb5 | ||
|
|
b9fb59f829 | ||
|
|
a3c3e71549 | ||
|
|
32e3df2806 | ||
|
|
a098653b2f | ||
|
|
5dbfe6b02f | ||
|
|
3e0138dbef | ||
|
|
a0dcca096a | ||
|
|
4510d5bae2 | ||
|
|
88d9993a14 | ||
|
|
163bda68c5 | ||
|
|
3d3730eab2 | ||
|
|
f9bbc5a9ad | ||
|
|
fe712b2ec6 | ||
|
|
7b0270bcd5 | ||
|
|
7747eb710e | ||
|
|
73611a6693 | ||
|
|
08ce241826 | ||
|
|
5cb844d4a8 | ||
|
|
808c2c15d1 | ||
|
|
9d657ea2ca | ||
|
|
85093b6a03 | ||
|
|
e860645a60 | ||
|
|
dac5ba9b16 | ||
|
|
4d4441466c | ||
|
|
260f1b862c | ||
|
|
4a710eea83 |
@@ -1,30 +0,0 @@
|
|||||||
version: 1
|
|
||||||
update_configs:
|
|
||||||
- package_manager: "javascript"
|
|
||||||
directory: "/"
|
|
||||||
update_schedule: "live"
|
|
||||||
default_labels:
|
|
||||||
- "dependencies"
|
|
||||||
commit_message:
|
|
||||||
prefix: "deps"
|
|
||||||
automerged_updates:
|
|
||||||
- match:
|
|
||||||
dependency_type: "development"
|
|
||||||
# Supported dependency types:
|
|
||||||
# - "development"
|
|
||||||
# - "production"
|
|
||||||
# - "all"
|
|
||||||
update_type: "all"
|
|
||||||
# Supported updates to automerge:
|
|
||||||
# - "security:patch"
|
|
||||||
# SemVer patch update that fixes a known security vulnerability
|
|
||||||
# - "semver:patch"
|
|
||||||
# SemVer patch update, e.g. > 1.x && 1.0.1 to 1.0.3
|
|
||||||
# - "semver:minor"
|
|
||||||
# SemVer minor update, e.g. > 1.x && 2.1.4 to 2.3.1
|
|
||||||
# - "in_range"
|
|
||||||
# matching the version requirement in your package manifest
|
|
||||||
# - "all"
|
|
||||||
- match:
|
|
||||||
dependency_type: "production"
|
|
||||||
update_type: "semver:patch"
|
|
||||||
3
.github/CODEOWNERS
vendored
Normal file
3
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
|
||||||
|
|
||||||
|
* @peaceiris
|
||||||
36
.github/ISSUE_TEMPLATE/1_user_support.md
vendored
Normal file
36
.github/ISSUE_TEMPLATE/1_user_support.md
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
name: User Support
|
||||||
|
about: Questions for this Action
|
||||||
|
title: 'sample_title'
|
||||||
|
labels: support
|
||||||
|
assignees: peaceiris
|
||||||
|
---
|
||||||
|
|
||||||
|
**Note that an issue which does not follow the template will be closed silently.**
|
||||||
|
|
||||||
|
## Check list before opening this issue
|
||||||
|
|
||||||
|
- [ ] I read the latest README of this repository.
|
||||||
|
|
||||||
|
For users of the GitHub Pages Action:
|
||||||
|
|
||||||
|
- [ ] I checked [Available Options](https://github.com/peaceiris/actions-gh-pages#options)
|
||||||
|
- [ ] I followed [Tips and FAQs](https://github.com/peaceiris/actions-gh-pages#tips-and-faq)
|
||||||
|
- [ ] I tried [Workflow Examples](https://github.com/peaceiris/actions-gh-pages#examples)
|
||||||
|
|
||||||
|
## Describe your question
|
||||||
|
|
||||||
|
A clear and concise description of what the question is.
|
||||||
|
|
||||||
|
## Link to your contents
|
||||||
|
|
||||||
|
- Link to your public repository here
|
||||||
|
- Link to your workflow here
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|
If applicable, add screenshots to help explain your question.
|
||||||
|
|
||||||
|
## Additional context
|
||||||
|
|
||||||
|
Add any other context about the problem here.
|
||||||
@@ -1,31 +1,39 @@
|
|||||||
---
|
---
|
||||||
name: Bug report
|
name: Bug Report
|
||||||
about: Create a report to help us improve
|
about: First, use the User Support Issue Template
|
||||||
title: 'Bug: This is a sample issue title'
|
title: 'sample_title'
|
||||||
labels: bug
|
labels: bug
|
||||||
assignees: peaceiris
|
assignees: peaceiris
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Describe the bug**
|
**Note that an issue which does not follow the template will be closed silently.**
|
||||||
|
|
||||||
|
## Describe the bug
|
||||||
|
|
||||||
A clear and concise description of what the bug is.
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
**To Reproduce**
|
## To Reproduce
|
||||||
|
|
||||||
Steps to reproduce the behavior:
|
Steps to reproduce the behavior:
|
||||||
1. Go to '...'
|
1. Go to '...'
|
||||||
2. Click on '....'
|
2. Click on '....'
|
||||||
3. Scroll down to '....'
|
3. Scroll down to '....'
|
||||||
4. See error
|
4. See error
|
||||||
|
|
||||||
**Expected behavior**
|
## Expected behavior
|
||||||
|
|
||||||
A clear and concise description of what you expected to happen.
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
**Screenshots**
|
## Screenshots
|
||||||
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
**Your YAML file**
|
## Your YAML file
|
||||||
|
|
||||||
- A link to your repository
|
- A link to your repository
|
||||||
- A link to your YAML file
|
- A link to your YAML file
|
||||||
|
|
||||||
**Additional context**
|
## Additional context
|
||||||
|
|
||||||
Add any other context about the problem here.
|
Add any other context about the problem here.
|
||||||
@@ -1,20 +1,26 @@
|
|||||||
---
|
---
|
||||||
name: Proposal
|
name: Proposal
|
||||||
about: Suggest an idea for this project
|
about: Suggest an idea for this project
|
||||||
title: 'proposal: This is a sample title'
|
title: 'sample_title'
|
||||||
labels: proposal
|
labels: proposal
|
||||||
assignees: peaceiris
|
assignees: peaceiris
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
**Note that an issue which does not follow the template will be closed silently.**
|
||||||
|
|
||||||
|
## Is your feature request related to a problem? Please describe.
|
||||||
|
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
## Describe the solution you'd like
|
||||||
|
|
||||||
A clear and concise description of what you want to happen.
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
## Describe alternatives you've considered
|
||||||
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
**Additional context**
|
## Additional context
|
||||||
|
|
||||||
Add any other context or screenshots about the feature request here.
|
Add any other context or screenshots about the feature request here.
|
||||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: GitHub Actions Community Forum
|
- name: GitHub Actions - GitHub Support Community Forum
|
||||||
url: https://github.community/t5/GitHub-Actions/bd-p/actions
|
url: https://github.community/c/github-actions
|
||||||
about: Please ask questions about GitHub Actions here.
|
about: Please ask questions about GitHub Actions here.
|
||||||
- name: Hugo Community Forum
|
- name: Hugo Community Forum
|
||||||
url: https://discourse.gohugo.io/
|
url: https://discourse.gohugo.io/
|
||||||
|
|||||||
28
.github/dependabot.yml
vendored
Normal file
28
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
time: '11:00'
|
||||||
|
timezone: Japan
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "@types/node"
|
||||||
|
versions:
|
||||||
|
- ">= 13.a, < 14"
|
||||||
|
- ">= 14.a, < 15"
|
||||||
|
commit-message:
|
||||||
|
prefix: deps
|
||||||
|
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
time: '11:00'
|
||||||
|
timezone: Japan
|
||||||
|
labels:
|
||||||
|
- "CI/CD"
|
||||||
|
commit-message:
|
||||||
|
prefix: ci
|
||||||
32
.github/label-commenter-config.yml
vendored
Normal file
32
.github/label-commenter-config.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
labels:
|
||||||
|
- name: invalid
|
||||||
|
labeled:
|
||||||
|
issue:
|
||||||
|
body: Please follow the issue templates.
|
||||||
|
action: close
|
||||||
|
- name: forum
|
||||||
|
labeled:
|
||||||
|
issue:
|
||||||
|
body: |
|
||||||
|
Please ask questions about GitHub Actions or Hugo at the following forum.
|
||||||
|
- [GitHub Actions Community Forum](https://github.community/c/github-actions)
|
||||||
|
- [Hugo Community Forum](https://discourse.gohugo.io/)
|
||||||
|
action: close
|
||||||
|
- name: wontfix
|
||||||
|
labeled:
|
||||||
|
issue:
|
||||||
|
body: This will not be worked on but we appreciate your contribution.
|
||||||
|
action: close
|
||||||
|
unlabeled:
|
||||||
|
issue:
|
||||||
|
body: This has become active again.
|
||||||
|
action: open
|
||||||
|
- name: duplicate
|
||||||
|
labeled:
|
||||||
|
issue:
|
||||||
|
body: This issue already exists.
|
||||||
|
action: close
|
||||||
|
- name: good first issue
|
||||||
|
labeled:
|
||||||
|
issue:
|
||||||
|
body: This issue is easy for contributing. Everyone can work on this.
|
||||||
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'
|
||||||
|
|||||||
25
.github/workflows/label-commenter.yml
vendored
Normal file
25
.github/workflows/label-commenter.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Label Commenter
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
- unlabeled
|
||||||
|
# pull_request:
|
||||||
|
# types:
|
||||||
|
# - labeled
|
||||||
|
# - unlabeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
comment:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
|
||||||
|
- name: Label Commenter
|
||||||
|
uses: peaceiris/actions-label-commenter@v1.3.7
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# config_file: .github/label-commenter-config.yml
|
||||||
17
.github/workflows/stale.yml
vendored
17
.github/workflows/stale.yml
vendored
@@ -1,17 +0,0 @@
|
|||||||
name: Stale
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "6 6 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stale:
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/stale@v1
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
stale-issue-message: 'This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
|
|
||||||
stale-pr-message: 'This pull request is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
|
|
||||||
days-before-stale: 21
|
|
||||||
days-before-close: 7
|
|
||||||
4
.github/workflows/test-action.yml
vendored
4
.github/workflows/test-action.yml
vendored
@@ -1,9 +1,9 @@
|
|||||||
name: Daily Test
|
name: Daily Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# push:
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '13 13 * * *'
|
- cron: '13 13 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -11,7 +11,9 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
|
- 'ubuntu-20.04'
|
||||||
- 'ubuntu-18.04'
|
- 'ubuntu-18.04'
|
||||||
|
- 'ubuntu-16.04'
|
||||||
- 'macos-latest'
|
- 'macos-latest'
|
||||||
- 'windows-latest'
|
- 'windows-latest'
|
||||||
hugo-version:
|
hugo-version:
|
||||||
|
|||||||
54
.github/workflows/test.yml
vendored
54
.github/workflows/test.yml
vendored
@@ -3,33 +3,25 @@ name: 'Test'
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
skipci:
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- run: echo "[Skip CI] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
|
- 'ubuntu-20.04'
|
||||||
- 'ubuntu-18.04'
|
- 'ubuntu-18.04'
|
||||||
|
- 'ubuntu-16.04'
|
||||||
- 'macos-latest'
|
- 'macos-latest'
|
||||||
- 'windows-latest'
|
- 'windows-latest'
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Read .nvmrc
|
- name: Read .nvmrc
|
||||||
@@ -37,57 +29,33 @@ jobs:
|
|||||||
id: nvm
|
id: nvm
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2.1.0
|
||||||
with:
|
with:
|
||||||
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
||||||
|
|
||||||
# - name: Get npm cache directory
|
- run: npm i -g npm
|
||||||
# id: npm-cache
|
|
||||||
# run: |
|
|
||||||
# echo "::set-output name=dir::$(npm config get cache)"
|
|
||||||
#
|
|
||||||
# - name: Cache npm
|
|
||||||
# uses: actions/cache@v1
|
|
||||||
# with:
|
|
||||||
# path: ${{ steps.npm-cache.outputs.dir }}
|
|
||||||
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
# restore-keys: |
|
|
||||||
# ${{ runner.os }}-node-
|
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|
||||||
- name: Run prettier
|
- name: Run prettier
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu-18.04')
|
||||||
run: npm run format:check
|
run: npm run format:check
|
||||||
|
|
||||||
- name: Run eslint
|
- name: Run eslint
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu-18.04')
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Run ncc
|
- name: Run ncc
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu-18.04')
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
|
||||||
- name: Upload test coverage as artifact
|
- name: Upload test coverage as artifact
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage-${{ matrix.os }}
|
||||||
path: coverage
|
path: coverage
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1.0.10
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
# - name: Upload test coverage to Coveralls
|
|
||||||
# uses: coverallsapp/github-action@v1.0.1
|
|
||||||
# with:
|
|
||||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# parallel: true
|
|
||||||
|
|
||||||
# - name: Coveralls Finished
|
|
||||||
# uses: coverallsapp/github-action@v1.0.1
|
|
||||||
# with:
|
|
||||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# parallel-finished: true
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
140
CHANGELOG.md
140
CHANGELOG.md
@@ -2,6 +2,146 @@
|
|||||||
|
|
||||||
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.12](https://github.com/peaceiris/actions-hugo/compare/v2.4.11...v2.4.12) (2020-06-21)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* Add CODEOWNERS ([75e0d6c](https://github.com/peaceiris/actions-hugo/commit/75e0d6c01d147a40a4ca4d546a35f0aa89977cd8))
|
||||||
|
* Enhance style ([07082d9](https://github.com/peaceiris/actions-hugo/commit/07082d9e3b019317c88ab12ee38807e476f9ae5c))
|
||||||
|
* Please follow the issue templates ([16b12f7](https://github.com/peaceiris/actions-hugo/commit/16b12f7dfe70a4b9d8a867616374a2b70b6cbd7d))
|
||||||
|
* Ported issue template ([2aa39a0](https://github.com/peaceiris/actions-hugo/commit/2aa39a0fb5fd48fb28b7fd4c1e41980674d291f4))
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* Add hook for doctoc ([2357c76](https://github.com/peaceiris/actions-hugo/commit/2357c76e2abc2649fcab48eb899a8b2a617d371a))
|
||||||
|
* add is_skip [skip ci] ([c0e9f57](https://github.com/peaceiris/actions-hugo/commit/c0e9f57fdbd5049eb5e8d479c10b7d85bccaf21f))
|
||||||
|
* Add Label Commenter Action ([271b8c5](https://github.com/peaceiris/actions-hugo/commit/271b8c5d4e39f7019428366d9194fb75beb26a23))
|
||||||
|
* add package-ecosystem github-actions ([38bf1d2](https://github.com/peaceiris/actions-hugo/commit/38bf1d20d08732c5b05fafc7093258d87ae8733a))
|
||||||
|
* Add ubuntu-16.04 ([55117bd](https://github.com/peaceiris/actions-hugo/commit/55117bdfe7031543062c1a69e3f4ccf28bec9448))
|
||||||
|
* Add ubuntu-20.04 (#355) ([926e28d](https://github.com/peaceiris/actions-hugo/commit/926e28de4aa8dca25a718a1eb8c593a771b2c3b3)), closes [#355](https://github.com/peaceiris/actions-hugo/issues/355)
|
||||||
|
* bump actions/setup-node from v1 to v2.0.0 (#359) ([41aa07a](https://github.com/peaceiris/actions-hugo/commit/41aa07a09a8f741e87bea9a2d763300f19702547)), closes [#359](https://github.com/peaceiris/actions-hugo/issues/359)
|
||||||
|
* bump codecov/codecov-action from v1 to v1.0.7 (#358) ([0b3975d](https://github.com/peaceiris/actions-hugo/commit/0b3975d69013fa58ebe97813b1de53260d654712)), closes [#358](https://github.com/peaceiris/actions-hugo/issues/358)
|
||||||
|
* Change update_type from all to semver:minor ([e4c9fb3](https://github.com/peaceiris/actions-hugo/commit/e4c9fb3020e200921210b2792ef39c5b70f335c6))
|
||||||
|
* Enhance test workflow (#301) ([0b128ac](https://github.com/peaceiris/actions-hugo/commit/0b128ac232579caa1e5817628f96aee1759a3627)), closes [#301](https://github.com/peaceiris/actions-hugo/issues/301)
|
||||||
|
* fix labels of github-actions ([697e1b0](https://github.com/peaceiris/actions-hugo/commit/697e1b0bf943bedbb08f978b353956d591f38dc0))
|
||||||
|
* remove pull_request.types ([312bc2c](https://github.com/peaceiris/actions-hugo/commit/312bc2c8e4e0c8f0e297fabe335bd322edbb5a3b))
|
||||||
|
* remove skipci job ([998d851](https://github.com/peaceiris/actions-hugo/commit/998d85162e3e9752aabdf6e7a2dd2dcdd946881e))
|
||||||
|
* Update Dependabot config file (#345) ([f0d9378](https://github.com/peaceiris/actions-hugo/commit/f0d93788f5871d7f4cfa35da5c12cada1b9de16e)), closes [#345](https://github.com/peaceiris/actions-hugo/issues/345)
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @actions/core from 1.2.3 to 1.2.4 ([aaaac3a](https://github.com/peaceiris/actions-hugo/commit/aaaac3ae9967a1f3277ceb6aab52070034ec3565))
|
||||||
|
* bump @actions/exec from 1.0.3 to 1.0.4 ([a098653](https://github.com/peaceiris/actions-hugo/commit/a098653b2f3a9ed5e9bb14ccbf32dfe70c3f4dd3))
|
||||||
|
* bump @actions/tool-cache from 1.3.4 to 1.3.5 ([9ba5218](https://github.com/peaceiris/actions-hugo/commit/9ba52187b56e1070eee5b8d28b899ed7317405f6))
|
||||||
|
* bump @actions/tool-cache from 1.3.5 to 1.5.5 (#333) ([3c2f87a](https://github.com/peaceiris/actions-hugo/commit/3c2f87a0bff49d8aed403dd586b84f128f9ba4fd)), closes [#333](https://github.com/peaceiris/actions-hugo/issues/333)
|
||||||
|
* bump @types/jest from 25.2.1 to 25.2.2 ([4c11e4e](https://github.com/peaceiris/actions-hugo/commit/4c11e4e48a81e55ee0841a8018f16ec59f27ca20))
|
||||||
|
* bump @types/jest from 25.2.2 to 25.2.3 ([b1d5e3f](https://github.com/peaceiris/actions-hugo/commit/b1d5e3fb147bfbb9c89327b64067e4cde1b2ac84))
|
||||||
|
* bump @types/jest from 25.2.3 to 26.0.0 (#352) ([b18493f](https://github.com/peaceiris/actions-hugo/commit/b18493fdf7d73b960b320e49e1d5b83991e87c88)), closes [#352](https://github.com/peaceiris/actions-hugo/issues/352)
|
||||||
|
* bump @types/node from 12.12.37 to 12.12.38 ([dc79cf9](https://github.com/peaceiris/actions-hugo/commit/dc79cf98c43e9310a1ab08bb501529d7ed6aaedc))
|
||||||
|
* bump @types/node from 12.12.38 to 12.12.41 ([89fc843](https://github.com/peaceiris/actions-hugo/commit/89fc843efbe601d77b00552cd75ef7a262f9560a))
|
||||||
|
* bump @types/node from 12.12.41 to 12.12.42 ([ad8ddd7](https://github.com/peaceiris/actions-hugo/commit/ad8ddd743ab4b5e555f93f960e2f9913624102ac))
|
||||||
|
* bump @types/node from 12.12.42 to 12.12.43 ([07ef174](https://github.com/peaceiris/actions-hugo/commit/07ef174ec463583d48557606ba0546543ff7a677))
|
||||||
|
* bump @types/node from 12.12.43 to 12.12.44 (#347) ([e92a791](https://github.com/peaceiris/actions-hugo/commit/e92a791bf30d2c682faf364d4d8658f944384d46)), closes [#347](https://github.com/peaceiris/actions-hugo/issues/347)
|
||||||
|
* bump @types/node from 12.12.44 to 12.12.45 (#350) ([b5e2760](https://github.com/peaceiris/actions-hugo/commit/b5e2760b23b75985a5963549ef967ad204e0b44a)), closes [#350](https://github.com/peaceiris/actions-hugo/issues/350)
|
||||||
|
* bump @types/node from 12.12.45 to 12.12.47 (#351) ([2f831ed](https://github.com/peaceiris/actions-hugo/commit/2f831edb58c1372ecf7707dd046cabece5687106)), closes [#351](https://github.com/peaceiris/actions-hugo/issues/351)
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.28.0 to 2.30.0 ([3e0138d](https://github.com/peaceiris/actions-hugo/commit/3e0138dbef3407a112e64881f1550c88456109e9))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.30.0 to 2.31.0 ([b92f084](https://github.com/peaceiris/actions-hugo/commit/b92f084f4595967244dc347624cfab55415b0bc1))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.31.0 to 2.32.0 ([9216be3](https://github.com/peaceiris/actions-hugo/commit/9216be3bc0ef12b561702f0a148c20b79f6834d2))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.32.0 to 2.33.0 ([66a332b](https://github.com/peaceiris/actions-hugo/commit/66a332b429091e28faebc300216f305e81c339f7))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.33.0 to 2.34.0 ([7e64f45](https://github.com/peaceiris/actions-hugo/commit/7e64f450a732b1336e2b46870c89d989cbf52d47))
|
||||||
|
* bump @typescript-eslint/parser from 2.30.0 to 2.31.0 ([b99a08a](https://github.com/peaceiris/actions-hugo/commit/b99a08a3b8e7dc0711f18e3c8180d1c8c873eb1b))
|
||||||
|
* bump @typescript-eslint/parser from 2.31.0 to 2.32.0 ([8c661f7](https://github.com/peaceiris/actions-hugo/commit/8c661f7d9b7ab8cf940148fde66a58a6befa6391))
|
||||||
|
* bump @typescript-eslint/parser from 2.32.0 to 2.33.0 ([012b11d](https://github.com/peaceiris/actions-hugo/commit/012b11dba4f2e38755c5acdfba1c4711f009c3ae))
|
||||||
|
* bump @typescript-eslint/parser from 2.33.0 to 2.34.0 ([271cee0](https://github.com/peaceiris/actions-hugo/commit/271cee08e77e64479d7282a1f7bba2733c1a5502))
|
||||||
|
* bump @zeit/ncc from 0.22.1 to 0.22.2 (#329) ([98135d2](https://github.com/peaceiris/actions-hugo/commit/98135d2cd0f2f4597c404384cafa03215fd01378)), closes [#329](https://github.com/peaceiris/actions-hugo/issues/329)
|
||||||
|
* bump @zeit/ncc from 0.22.2 to 0.22.3 (#339) ([8f166cf](https://github.com/peaceiris/actions-hugo/commit/8f166cf07e4691d65b912ad2fef51aa3e5ff57fe)), closes [#339](https://github.com/peaceiris/actions-hugo/issues/339)
|
||||||
|
* bump eslint-plugin-jest from 23.10.0 to 23.11.0 ([c264525](https://github.com/peaceiris/actions-hugo/commit/c264525a0ab2387ea6309d92576e7462c903a1f5))
|
||||||
|
* bump eslint-plugin-jest from 23.11.0 to 23.12.0 ([e6a0191](https://github.com/peaceiris/actions-hugo/commit/e6a01917e07ede5857ebc5e686249e8d3ff9a491))
|
||||||
|
* bump eslint-plugin-jest from 23.12.0 to 23.13.0 ([dd37fe2](https://github.com/peaceiris/actions-hugo/commit/dd37fe20fa14d9a38229a3d004c1db29de6a6e74))
|
||||||
|
* bump eslint-plugin-jest from 23.13.0 to 23.13.1 ([7d80e16](https://github.com/peaceiris/actions-hugo/commit/7d80e1641cfd813ce9387b4b9961a4e7845f31ec))
|
||||||
|
* bump eslint-plugin-jest from 23.13.1 to 23.13.2 ([b458469](https://github.com/peaceiris/actions-hugo/commit/b458469ce7b3a8dd28e7c9cd4428bbf293202e18))
|
||||||
|
* bump eslint-plugin-jest from 23.8.2 to 23.9.0 ([11b6ba4](https://github.com/peaceiris/actions-hugo/commit/11b6ba478ca58a02938a6d650d6d0a7a0637054e))
|
||||||
|
* bump eslint-plugin-jest from 23.9.0 to 23.10.0 ([ef0b1e0](https://github.com/peaceiris/actions-hugo/commit/ef0b1e0a8500c34dff72bb6e730a5d2d62db362f))
|
||||||
|
* bump git from 2.26.1 to 2.27.0 (#354) ([5420562](https://github.com/peaceiris/actions-hugo/commit/54205620eee116a6c8b2b43047be61fec3713f75)), closes [#354](https://github.com/peaceiris/actions-hugo/issues/354)
|
||||||
|
* bump jest from 25.5.0 to 25.5.1 ([b9fb59f](https://github.com/peaceiris/actions-hugo/commit/b9fb59f829d2305d75c8d6f4acafa19d0f3c9376))
|
||||||
|
* bump jest from 25.5.1 to 25.5.2 ([b9569c2](https://github.com/peaceiris/actions-hugo/commit/b9569c27b6b33a0677dbb14f753b4494b7aa3ff1))
|
||||||
|
* bump jest from 25.5.2 to 25.5.3 ([815ceae](https://github.com/peaceiris/actions-hugo/commit/815ceae6cf2313a1c633cfc24648f08015101d49))
|
||||||
|
* bump jest from 25.5.3 to 25.5.4 ([b0c6103](https://github.com/peaceiris/actions-hugo/commit/b0c61036db0b2f5747405b1c2e29c262d3af6364))
|
||||||
|
* bump jest-circus from 25.5.0 to 25.5.1 ([a3c3e71](https://github.com/peaceiris/actions-hugo/commit/a3c3e71549f8f2b4d19e2a9c1908bc094d3c7964))
|
||||||
|
* bump jest-circus from 25.5.1 to 25.5.2 ([ed2a699](https://github.com/peaceiris/actions-hugo/commit/ed2a6998667974d53da9eb518d497f1842362413))
|
||||||
|
* bump jest-circus from 25.5.2 to 25.5.3 ([02e6a28](https://github.com/peaceiris/actions-hugo/commit/02e6a28e7e7ecfd74ba1de73a0e69cd9d32aa856))
|
||||||
|
* bump jest-circus from 25.5.3 to 25.5.4 ([9983819](https://github.com/peaceiris/actions-hugo/commit/9983819c7b12bf0b2199eefb45264ef96b2b86ec))
|
||||||
|
* bump jest-circus from 25.5.4 to 26.0.0 ([fc3f6e7](https://github.com/peaceiris/actions-hugo/commit/fc3f6e7cc9e9bbd4a31ba5644b44a40c4e092882))
|
||||||
|
* bump jest-circus from 26.0.0 to 26.0.1 ([4271d65](https://github.com/peaceiris/actions-hugo/commit/4271d65cbac605d9b9143a59ed77436a90328439))
|
||||||
|
* bump lint-staged from 10.1.6 to 10.2.0 ([5dbfe6b](https://github.com/peaceiris/actions-hugo/commit/5dbfe6b02fa7ea6c544a91b8c733f370eb781fe1))
|
||||||
|
* bump lint-staged from 10.2.0 to 10.2.1 ([97168f4](https://github.com/peaceiris/actions-hugo/commit/97168f4ffdc9120321ab81f3785ed883a0292da2))
|
||||||
|
* bump lint-staged from 10.2.1 to 10.2.2 ([466efd6](https://github.com/peaceiris/actions-hugo/commit/466efd6e327be8268c8e4f58b8dde51b571696b0))
|
||||||
|
* bump lint-staged from 10.2.10 to 10.2.11 (#357) ([4ec522d](https://github.com/peaceiris/actions-hugo/commit/4ec522dca345774f865ef33f624c622763dedbb8)), closes [#357](https://github.com/peaceiris/actions-hugo/issues/357)
|
||||||
|
* bump lint-staged from 10.2.2 to 10.2.4 ([2cdb0da](https://github.com/peaceiris/actions-hugo/commit/2cdb0da4debc0c98061b4e09c6547ddd2db1834c))
|
||||||
|
* bump lint-staged from 10.2.4 to 10.2.6 ([b920e24](https://github.com/peaceiris/actions-hugo/commit/b920e249f6a1acb1fbff7ff6e8711916869a27c3))
|
||||||
|
* bump lint-staged from 10.2.6 to 10.2.7 ([592603c](https://github.com/peaceiris/actions-hugo/commit/592603c7c2a30e3a450363117c41a7ec358f2d06))
|
||||||
|
* bump lint-staged from 10.2.7 to 10.2.8 (#346) ([533dde8](https://github.com/peaceiris/actions-hugo/commit/533dde857531b95164d8d5f21462187e581618a9)), closes [#346](https://github.com/peaceiris/actions-hugo/issues/346)
|
||||||
|
* bump lint-staged from 10.2.8 to 10.2.9 (#349) ([dcf08e2](https://github.com/peaceiris/actions-hugo/commit/dcf08e2fd2c712501ecb05cbc2005a1e4de06092)), closes [#349](https://github.com/peaceiris/actions-hugo/issues/349)
|
||||||
|
* bump lint-staged from 10.2.9 to 10.2.10 (#356) ([914abda](https://github.com/peaceiris/actions-hugo/commit/914abda3d8422bc3d850bb3651f7540dd714036a)), closes [#356](https://github.com/peaceiris/actions-hugo/issues/356)
|
||||||
|
* bump node from 12.16.1 to 12.16.3 (#288) ([32e3df2](https://github.com/peaceiris/actions-hugo/commit/32e3df2806a568e829146259abc0965797b6cf59)), closes [#288](https://github.com/peaceiris/actions-hugo/issues/288)
|
||||||
|
* bump node from 12.16.3 to 12.18.0 (#353) ([09cf940](https://github.com/peaceiris/actions-hugo/commit/09cf94008e15f8629028e708ebf5049286556670)), closes [#353](https://github.com/peaceiris/actions-hugo/issues/353)
|
||||||
|
* bump node from 12.18.0 to 12.18.1 (#360) ([7160613](https://github.com/peaceiris/actions-hugo/commit/71606133495c4ec46bff6f3096e9f98e62a24e05)), closes [#360](https://github.com/peaceiris/actions-hugo/issues/360)
|
||||||
|
* bump standard-version from 7.1.0 to 8.0.0 ([73356f0](https://github.com/peaceiris/actions-hugo/commit/73356f0ae57cb8fb165a929f8e9637120334b86a))
|
||||||
|
* bump ts-jest from 25.4.0 to 25.5.0 ([0c93074](https://github.com/peaceiris/actions-hugo/commit/0c93074aabfd1477a93af132e2e6ca8b397919d9))
|
||||||
|
* bump ts-jest from 25.5.0 to 25.5.1 ([d7c46d0](https://github.com/peaceiris/actions-hugo/commit/d7c46d09c935763ad519d2f34290f4ac6be38ccb))
|
||||||
|
* bump typescript from 3.8.3 to 3.9.2 ([b555054](https://github.com/peaceiris/actions-hugo/commit/b55505415753f290f1e3e93b92826257bd21aaee))
|
||||||
|
* bump typescript from 3.9.2 to 3.9.3 ([d3ebe5d](https://github.com/peaceiris/actions-hugo/commit/d3ebe5d657f863b5879b6fb2df7e6ba6bb2e983f))
|
||||||
|
* bump typescript from 3.9.3 to 3.9.5 (#348) ([658d24b](https://github.com/peaceiris/actions-hugo/commit/658d24bb3e335ec5695aa87bc6b2c02cd78f0028)), closes [#348](https://github.com/peaceiris/actions-hugo/issues/348)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* add Babel ([b99235e](https://github.com/peaceiris/actions-hugo/commit/b99235e60ed6e4cbf138aa9167f567a4a6c664e6))
|
||||||
|
* Add new section for asciidoctor ([71fe6db](https://github.com/peaceiris/actions-hugo/commit/71fe6dbc7f2bd0596392fe20805753a67b00af1f)), closes [#342](https://github.com/peaceiris/actions-hugo/issues/342)
|
||||||
|
* Add new section for google/docsy ([e3045c5](https://github.com/peaceiris/actions-hugo/commit/e3045c5fb50cfbacbc0d9b9ce287d7e112f56e00))
|
||||||
|
* bump hugo from 0.68.3 to 0.71.0 ([cb3ccf6](https://github.com/peaceiris/actions-hugo/commit/cb3ccf6f428dc8320595af305c6531679b343eb1))
|
||||||
|
* bump hugo to 0.71.1 ([cb1a02b](https://github.com/peaceiris/actions-hugo/commit/cb1a02bb3535bef17b19b5811658d61b60377bcc))
|
||||||
|
* bump hugo to 0.71.1 ([ad41861](https://github.com/peaceiris/actions-hugo/commit/ad41861beb535cc414f8a2ff238b28aa334db49a))
|
||||||
|
* remove Dependabot status badge ([aa5de43](https://github.com/peaceiris/actions-hugo/commit/aa5de43b2b75066241428b66dcf9204351ab680b))
|
||||||
|
* update ToC ([dd33407](https://github.com/peaceiris/actions-hugo/commit/dd334074ce1f4f6c0e3599c0c913426bac4575fe))
|
||||||
|
* update url ([0f35b33](https://github.com/peaceiris/actions-hugo/commit/0f35b33b7371b0c4b115eeb0ea6acdb9cd2e0e78))
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* Wrap an entrypoint by async to handle exceptions correctly (#363) ([54af4c1](https://github.com/peaceiris/actions-hugo/commit/54af4c1320eee4b2c9c6d46b4bede3f593b1bc50)), closes [#363](https://github.com/peaceiris/actions-hugo/issues/363)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.11](https://github.com/peaceiris/actions-hugo/compare/v2.4.10...v2.4.11) (2020-04-29)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* Add npm i -g npm ([9d657ea](https://github.com/peaceiris/actions-hugo/commit/9d657ea2ca451bcaf8c3f9d07b83cabda69cc211))
|
||||||
|
* delete Stale workflow ([260f1b8](https://github.com/peaceiris/actions-hugo/commit/260f1b862cb3e9057add124e356f8ad57a19678a))
|
||||||
|
* remove unused steps ([85093b6](https://github.com/peaceiris/actions-hugo/commit/85093b6a03b26aa8ff08319f044ca0d9213fd86f))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @actions/tool-cache from 1.3.3 to 1.3.4 (#280) ([7b0270b](https://github.com/peaceiris/actions-hugo/commit/7b0270bcd541e18f3f8bc7113d5a0b0fd8daa9e7)), closes [#280](https://github.com/peaceiris/actions-hugo/issues/280)
|
||||||
|
* bump @types/node from 12.12.35 to 12.12.36 ([e860645](https://github.com/peaceiris/actions-hugo/commit/e860645a6078954ac9977a7a26ec2de1471cc214))
|
||||||
|
* bump @types/node from 12.12.36 to 12.12.37 ([163bda6](https://github.com/peaceiris/actions-hugo/commit/163bda68c5ba75a0e100a0a73094de4682f9570f))
|
||||||
|
* bump @types/node-fetch from 2.5.6 to 2.5.7 ([fe712b2](https://github.com/peaceiris/actions-hugo/commit/fe712b2ec6b34f70a7a515061b0e3ea0aa5af09e))
|
||||||
|
* bump @typescript-eslint/parser from 2.28.0 to 2.30.0 ([3d3730e](https://github.com/peaceiris/actions-hugo/commit/3d3730eab2a06b569b59142cf64c6ffafb65860a))
|
||||||
|
* bump jest from 25.3.0 to 25.5.0 ([7747eb7](https://github.com/peaceiris/actions-hugo/commit/7747eb710e4e55e2f0cb438cc77e43a43f454978))
|
||||||
|
* bump jest-circus from 25.3.0 to 25.5.0 ([73611a6](https://github.com/peaceiris/actions-hugo/commit/73611a6693297105e7a091829327400099b77f8c))
|
||||||
|
* bump lint-staged from 10.1.3 to 10.1.4 ([dac5ba9](https://github.com/peaceiris/actions-hugo/commit/dac5ba9b16d4e2e49568d1f0f5f78edf3ae5ead6))
|
||||||
|
* bump lint-staged from 10.1.4 to 10.1.5 ([808c2c1](https://github.com/peaceiris/actions-hugo/commit/808c2c15d159869de692307d7675bc345bf4d5ab))
|
||||||
|
* bump lint-staged from 10.1.5 to 10.1.6 ([5cb844d](https://github.com/peaceiris/actions-hugo/commit/5cb844d4a880257a8fae7dd06a754997cc499b7a))
|
||||||
|
* bump prettier from 2.0.4 to 2.0.5 ([f9bbc5a](https://github.com/peaceiris/actions-hugo/commit/f9bbc5a9ad3363924f05399d86ead5457da0d10f))
|
||||||
|
* bump ts-jest from 25.3.1 to 25.4.0 ([4d44414](https://github.com/peaceiris/actions-hugo/commit/4d4441466ca7b6b69af762b07ac8649d918c9aca))
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* Add link for the first deployment ([08ce241](https://github.com/peaceiris/actions-hugo/commit/08ce2418260b67becef3f05f3a2e0199616c018d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.4.10](https://github.com/peaceiris/actions-hugo/compare/v2.4.9...v2.4.10) (2020-04-15)
|
## [2.4.10](https://github.com/peaceiris/actions-hugo/compare/v2.4.9...v2.4.10) (2020-04-15)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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.26.1"
|
ENV GIT_VERSION="2.27.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" && \
|
||||||
|
|||||||
3
Makefile
3
Makefile
@@ -2,14 +2,13 @@ cmd := "bash"
|
|||||||
msg := ""
|
msg := ""
|
||||||
IMAGE_NAME := actions_hugo_dev:latest
|
IMAGE_NAME := actions_hugo_dev:latest
|
||||||
NODE_VERSION := $(shell cat ./.nvmrc)
|
NODE_VERSION := $(shell cat ./.nvmrc)
|
||||||
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
|
|
||||||
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
|
DOCKER_RUN := 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)
|
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
$(DOCKER_BUILD)
|
docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run:
|
run:
|
||||||
|
|||||||
128
README.md
128
README.md
@@ -1,12 +1,11 @@
|
|||||||
[](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://dependabot.com)
|
|
||||||
|
|
||||||
[](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">
|
||||||
@@ -48,6 +47,8 @@ Thanks to this change, we can complete this action in less than a few seconds.
|
|||||||
- [⭐️ 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)
|
||||||
- [⭐️ 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 asciidoctor](#%EF%B8%8F-workflow-for-asciidoctor)
|
||||||
- [CHANGELOG](#changelog)
|
- [CHANGELOG](#changelog)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
- [About Maintainer](#about-maintainer)
|
- [About Maintainer](#about-maintainer)
|
||||||
@@ -61,22 +62,20 @@ Thanks to this change, we can complete this action in less than a few seconds.
|
|||||||
|
|
||||||
### ⭐️ Create your workflow
|
### ⭐️ Create your workflow
|
||||||
|
|
||||||
An example workflow `.github/workflows/gh-pages.yml` with [GitHub Actions for GitHub Pages]
|
An example workflow `.github/workflows/gh-pages.yml` with [GitHub Actions for GitHub Pages].
|
||||||
|
For the first deployment, we have to do this operation: [First Deployment with `GITHUB_TOKEN` - peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-first-deployment-with-github_token)
|
||||||
|
|
||||||
[GitHub Actions for GitHub Pages]: https://github.com/peaceiris/actions-gh-pages
|
[GitHub Actions for GitHub Pages]: https://github.com/peaceiris/actions-gh-pages
|
||||||
|
|
||||||
[](https://github.com/peaceiris/actions-gh-pages)
|
[](https://github.com/peaceiris/actions-gh-pages)
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: github pages
|
name: github pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@@ -84,13 +83,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true # Fetch Hugo themes
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.68.3'
|
hugo-version: '0.74.1'
|
||||||
# extended: true
|
# extended: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -119,7 +118,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.68.3'
|
hugo-version: '0.74.1'
|
||||||
extended: true
|
extended: true
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -151,7 +150,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.68.3
|
HUGO_VERSION=0.74.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.
|
||||||
@@ -194,6 +193,107 @@ The alpine base Hugo Docker image is provided on the following repository.
|
|||||||
|
|
||||||
> [peaceiris/hugo-extended-docker: Hugo alpine base Docker image (Hugo extended and Hugo Modules)](https://github.com/peaceiris/hugo-extended-docker)
|
> [peaceiris/hugo-extended-docker: Hugo alpine base Docker image (Hugo extended and Hugo Modules)](https://github.com/peaceiris/hugo-extended-docker)
|
||||||
|
|
||||||
|
### ⭐️ Workflow for autoprefixer and postcss-cli
|
||||||
|
|
||||||
|
Here is an example workflow for the [google/docsy] Hugo theme.
|
||||||
|
This theme needs `autoprefixer` and `postcss-cli` to build a project.
|
||||||
|
The following workflow is tested on [google/docsy-example].
|
||||||
|
|
||||||
|
[google/docsy]: https://github.com/google/docsy
|
||||||
|
[google/docsy-example]: https://github.com/google/docsy-example
|
||||||
|
|
||||||
|
A workflow for the Hugo Babel pipeline is also the same as follows.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: github pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive # Fetch the Docsy theme
|
||||||
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: '0.74.1'
|
||||||
|
extended: true
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '12.x'
|
||||||
|
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
|
- run: npm ci
|
||||||
|
- run: hugo --minify
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
### ⭐️ Workflow for asciidoctor
|
||||||
|
|
||||||
|
Here is an example workflow for a Hugo project using `asciidoctor`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: github pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||||
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: '0.74.1'
|
||||||
|
extended: true
|
||||||
|
|
||||||
|
- name: Setup Ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.7
|
||||||
|
|
||||||
|
- run: gem install asciidoctor
|
||||||
|
|
||||||
|
- name: Run Hugo
|
||||||
|
run: |
|
||||||
|
alias asciidoctor="asciidoctor --attribute=experimental=true --attribute=icons=font"
|
||||||
|
hugo --minify
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<a href="#table-of-contents">Back to TOC ☝️</a>
|
<a href="#table-of-contents">Back to TOC ☝️</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,7 +310,7 @@ The alpine base Hugo Docker image is provided on the following repository.
|
|||||||
|
|
||||||
- [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);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
version: '3.2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
dev:
|
||||||
|
image: 'docker.pkg.github.com/peaceiris/actions-hugo/dev:latest'
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
# cache_from:
|
||||||
|
# - 'docker.pkg.github.com/peaceiris/actions-hugo/dev:latest'
|
||||||
|
container_name: peaceiris_actions_hugo_dev_latest
|
||||||
|
volumes:
|
||||||
|
- ${PWD}:/repo
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
command:
|
||||||
|
- bash
|
||||||
6701
lib/index.js
6701
lib/index.js
File diff suppressed because it is too large
Load Diff
5040
package-lock.json
generated
5040
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
41
package.json
41
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "actions-hugo",
|
"name": "actions-hugo",
|
||||||
"version": "2.4.10",
|
"version": "2.4.12",
|
||||||
"description": "GitHub Actions for Hugo",
|
"description": "GitHub Actions for Hugo",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -27,9 +27,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"src/**/*.ts": [
|
"{src,__tests__}/**/*.ts": [
|
||||||
"prettier --check",
|
"prettier --check",
|
||||||
"eslint"
|
"eslint"
|
||||||
|
],
|
||||||
|
"README.md": [
|
||||||
|
"npx doctoc@1.4.0 --github"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -51,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.3",
|
"@actions/core": "^1.2.4",
|
||||||
"@actions/exec": "^1.0.3",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.3.3",
|
"@actions/tool-cache": "^1.6.0",
|
||||||
"node-fetch": "^2.6.0"
|
"node-fetch": "^2.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^25.2.1",
|
"@types/jest": "^26.0.4",
|
||||||
"@types/node": "~12",
|
"@types/node": "~12",
|
||||||
"@types/node-fetch": "^2.5.6",
|
"@types/node-fetch": "^2.5.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.28.0",
|
"@typescript-eslint/eslint-plugin": "^2.34.0",
|
||||||
"@typescript-eslint/parser": "^2.28.0",
|
"@typescript-eslint/parser": "^2.34.0",
|
||||||
"@zeit/ncc": "^0.22.1",
|
"@zeit/ncc": "^0.22.3",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-plugin-jest": "^23.8.2",
|
"eslint-plugin-jest": "^23.18.0",
|
||||||
"husky": "^4.2.5",
|
"husky": "^4.2.5",
|
||||||
"jest": "^25.3.0",
|
"jest": "^25.5.4",
|
||||||
"jest-circus": "^25.3.0",
|
"jest-circus": "^26.1.0",
|
||||||
"lint-staged": "^10.1.3",
|
"lint-staged": "^10.2.11",
|
||||||
"nock": "^12.0.3",
|
"nock": "^13.0.2",
|
||||||
"prettier": "2.0.4",
|
"prettier": "2.0.5",
|
||||||
"standard-version": "^7.1.0",
|
"standard-version": "^8.0.2",
|
||||||
"ts-jest": "^25.3.1",
|
"ts-jest": "^25.5.1",
|
||||||
"typescript": "^3.8.3"
|
"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_';
|
||||||
|
|||||||
12
src/index.ts
12
src/index.ts
@@ -1,8 +1,10 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as main from './main';
|
import * as main from './main';
|
||||||
|
|
||||||
try {
|
(async (): Promise<void> => {
|
||||||
main.run();
|
try {
|
||||||
} catch (e) {
|
await main.run();
|
||||||
core.setFailed(`Action failed with error ${e}`);
|
} catch (e) {
|
||||||
}
|
core.setFailed(`Action failed with error ${e.message}`);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|||||||
@@ -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