mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-14 22:29:17 +08:00
Compare commits
260 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4b09552702 | ||
|
aa83d0c2cf | ||
|
ababa3d330 | ||
|
e46b3c13b3 | ||
|
043abd3e23 | ||
|
ff76ce4ba8 | ||
|
f29c5724c6 | ||
|
2f6fbdfbd5 | ||
|
ac010ec1f2 | ||
|
945f31d648 | ||
|
146f6aa3aa | ||
|
bd241a0d4d | ||
|
a1da173b8b | ||
|
0b7567fde6 | ||
|
a16b61f078 | ||
|
fa8661b296 | ||
|
4f9cc6602d | ||
|
9c75028a53 | ||
|
5049354438 | ||
|
4eb285e828 | ||
|
cdc09a3baa | ||
|
d830378ec6 | ||
|
80daa1d144 | ||
|
108285e909 | ||
|
99c95ff54e | ||
|
1f4653792d | ||
|
010129e8cf | ||
|
c04cfb71e7 | ||
|
04c3b0d15d | ||
|
3c68be13b3 | ||
|
4742e740d0 | ||
|
5e45b5dcd8 | ||
|
6ee61b79d5 | ||
|
417f92fdd8 | ||
|
e2a4f025c9 | ||
|
74d2f4c379 | ||
|
e69643f175 | ||
|
f026ea2bbe | ||
|
6b2414c9be | ||
|
6cdec55d3f | ||
|
d8bf9f86a3 | ||
|
b3874735d6 | ||
|
b52b41fae2 | ||
|
a7ddc29c35 | ||
|
a9641a0bc8 | ||
|
5e1c7e7bc6 | ||
|
c44a4fc731 | ||
|
6c5e89164c | ||
|
467dcabae7 | ||
|
1f4db34371 | ||
|
b724f576a5 | ||
|
bcf9735214 | ||
|
3ae1228acc | ||
|
a3f40baff8 | ||
|
682a3a735c | ||
|
38b25433b9 | ||
|
ae221b7c50 | ||
|
89244b1cbe | ||
|
279de227eb | ||
|
b66906400d | ||
|
6bba92debc | ||
|
0129e86d88 | ||
|
4d1ecb8e1c | ||
|
79ee348845 | ||
|
cb0dcd7031 | ||
|
86d9e12738 | ||
|
61ec32a536 | ||
|
92dfa99669 | ||
|
d71bc23aad | ||
|
87c3e9ec3f | ||
|
1cb084f5ba | ||
|
5240c0d842 | ||
|
4dc558f966 | ||
|
732722abc2 | ||
|
48e85c7330 | ||
|
7ba1270da4 | ||
|
4daeb78d00 | ||
|
ae2cd31f2b | ||
|
99a8097f79 | ||
|
d04d1f508f | ||
|
7bd53a1270 | ||
|
8116766a7f | ||
|
a7ad69121d | ||
|
e47dc1fce9 | ||
|
1abfb872a4 | ||
|
e2eebc8cf5 | ||
|
e3d288aced | ||
|
65ebf11929 | ||
|
87231bc03a | ||
|
88b4d2aa92 | ||
|
579d4683a6 | ||
|
53672794bd | ||
|
0b3168d85f | ||
|
ecd56b0080 | ||
|
78ae7a2550 | ||
|
33763ce944 | ||
|
60f9fc9125 | ||
|
f120c354d4 | ||
|
08c4468107 | ||
|
aa3ded5f54 | ||
|
549cbccf20 | ||
|
02c096c7ae | ||
|
6224cceade | ||
|
e408c2b5b7 | ||
|
40ceb269a8 | ||
|
603b48d31e | ||
|
9029fb38f8 | ||
|
a849d5f5d1 | ||
|
0f35755941 | ||
|
8fac1ab7e4 | ||
|
d5f70ca9b6 | ||
|
f915517a64 | ||
|
17ee2a4317 | ||
|
c2307841f8 | ||
|
00849af781 | ||
|
0cf303c515 | ||
|
f09b4d7e2f | ||
|
04f8b72705 | ||
|
c00e237c63 | ||
|
0887d0ca82 | ||
|
177e73ec93 | ||
|
25ab86ef33 | ||
|
5f3ccc7a05 | ||
|
eaaca9a01b | ||
|
88391461a5 | ||
|
aeef856898 | ||
|
80c9fd5609 | ||
|
7181847f5f | ||
|
cf3131b96d | ||
|
1fa15b40ee | ||
|
6b5e721472 | ||
|
5c3786b93f | ||
|
30155ac2ce | ||
|
d75c9c68a6 | ||
|
3c6e26bf88 | ||
|
5c2402f854 | ||
|
0fbd122442 | ||
|
97d8bbdfe9 | ||
|
39e645cff9 | ||
|
a2a2b7b78d | ||
|
f0f1e893fc | ||
|
e76f1e7fdb | ||
|
a4ea9ceebb | ||
|
6add02d988 | ||
|
002d40c1b0 | ||
|
183ff8d4d1 | ||
|
d63c64bf05 | ||
|
79a96898c6 | ||
|
6552e845d6 | ||
|
6aa6599ce5 | ||
|
cc17d261c9 | ||
|
f2c58a7772 | ||
|
632be0ae48 | ||
|
61cf177907 | ||
|
f223cf5bac | ||
|
67f80d94a1 | ||
|
0051bc94f3 | ||
|
a9ba7acf74 | ||
|
5a83fe7930 | ||
|
d2f70def42 | ||
|
b4f72218ba | ||
|
357abd46e4 | ||
|
ea4ed94409 | ||
|
15a019fd2a | ||
|
842eecdfb6 | ||
|
627df3d602 | ||
|
c57ac395ad | ||
|
f8de6794a9 | ||
|
a2a8d7acd1 | ||
|
339caee9d4 | ||
|
0912f94a86 | ||
|
f59da029d3 | ||
|
373f7f263a | ||
|
00e2f338db | ||
|
31c15f0329 | ||
|
6f6875cdf6 | ||
|
ee58d74b7a | ||
|
67383c90a3 | ||
|
f2f45dd826 | ||
|
69c02d4e82 | ||
|
b8ecadfc08 | ||
|
66f12e737e | ||
|
5a7e52de3d | ||
|
599324c6ed | ||
|
0d67ec5c39 | ||
|
78b3816969 | ||
|
43f2073e60 | ||
|
486938a015 | ||
|
883423edd8 | ||
|
92c7c21410 | ||
|
65d77f816a | ||
|
2c0c03e6f4 | ||
|
28958bab3a | ||
|
aca9d72df7 | ||
|
c68a9bf36e | ||
|
773d4316b8 | ||
|
33d882af54 | ||
|
93bd8c5f6d | ||
|
1008c8c81c | ||
|
e9cc68c240 | ||
|
884a0224fd | ||
|
e5d60a65a4 | ||
|
06aa22c0f9 | ||
|
cc91d0e9f8 | ||
|
45065d5c03 | ||
|
2c16db0f50 | ||
|
589f1617f5 | ||
|
32e33dcd3a | ||
|
1977c44664 | ||
|
bd8c6b06eb | ||
|
ae7759a398 | ||
|
9b7ce2a171 | ||
|
983978086a | ||
|
7859c9b784 | ||
|
fd54e565f4 | ||
|
2c6daf7153 | ||
|
8206a5f364 | ||
|
cba22ba760 | ||
|
87c1b90704 | ||
|
411de78882 | ||
|
9209134025 | ||
|
2ae4e44c71 | ||
|
20411ac459 | ||
|
76446f8a5e | ||
|
8fc4f66b0e | ||
|
6932db2544 | ||
|
16b8f766df | ||
|
ffa3183092 | ||
|
afad39bf81 | ||
|
29aefb7700 | ||
|
0725e5789b | ||
|
3b42e19751 | ||
|
fe2eb19a96 | ||
|
25b90d1c7e | ||
|
416f539fb4 | ||
|
32c9288f55 | ||
|
da1b4ad62b | ||
|
b992418825 | ||
|
6c8719badb | ||
|
47d01f16d3 | ||
|
5e5dc6d02e | ||
|
7af79a873e | ||
|
dd7d778958 | ||
|
e3aa46d23b | ||
|
2306f39f4e | ||
|
64b46b4226 | ||
|
1a7c3d89ae | ||
|
679dbf02f6 | ||
|
25b12e2a24 | ||
|
2f463a5ad5 | ||
|
f94667a25c | ||
|
fdfb4d88a0 | ||
|
072d16c439 | ||
|
7166f2caa4 | ||
|
e3b45f2700 | ||
|
1808965241 | ||
|
a5f971f112 | ||
|
087a759f90 | ||
|
9af6a68dde | ||
|
811c45844b |
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -8,7 +8,7 @@ contact_links:
|
|||||||
about: Please ask questions about GitHub Actions here.
|
about: Please ask questions about GitHub Actions here.
|
||||||
- name: GitHub Pages Documentation
|
- name: GitHub Pages Documentation
|
||||||
url: https://docs.github.com/en/pages
|
url: https://docs.github.com/en/pages
|
||||||
about: GitHub Pages official documentaion here.
|
about: GitHub Pages official documentation here.
|
||||||
- name: GitHub Actions Documentation
|
- name: GitHub Actions Documentation
|
||||||
url: https://docs.github.com/en/actions
|
url: https://docs.github.com/en/actions
|
||||||
about: GitHub Actions official documentation here.
|
about: GitHub Actions official documentation here.
|
||||||
|
23
.github/dependabot.yml
vendored
23
.github/dependabot.yml
vendored
@ -1,23 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: npm
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: daily
|
|
||||||
time: '11:00'
|
|
||||||
timezone: Japan
|
|
||||||
labels:
|
|
||||||
- dependencies
|
|
||||||
allow:
|
|
||||||
- dependency-type: "production"
|
|
||||||
commit-message:
|
|
||||||
prefix: deps
|
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
labels:
|
|
||||||
- "CI/CD"
|
|
||||||
commit-message:
|
|
||||||
prefix: ci
|
|
2
.github/labeler.yml
vendored
2
.github/labeler.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
CI/CD:
|
cicd:
|
||||||
- .github/workflows/*
|
- .github/workflows/*
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
8
.github/workflows/codeql.yml
vendored
8
.github/workflows/codeql.yml
vendored
@ -10,15 +10,15 @@ jobs:
|
|||||||
CodeQL-Build:
|
CodeQL-Build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@v3
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v3
|
||||||
|
4
.github/workflows/dependency-review.yml
vendored
4
.github/workflows/dependency-review.yml
vendored
@ -12,5 +12,5 @@ jobs:
|
|||||||
dependency-review:
|
dependency-review:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/dependency-review-action@v2
|
- uses: actions/dependency-review-action@v4
|
||||||
|
2
.github/workflows/label-commenter.yml
vendored
2
.github/workflows/label-commenter.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
comment:
|
comment:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Label Commenter
|
- name: Label Commenter
|
||||||
uses: peaceiris/actions-label-commenter@v1
|
uses: peaceiris/actions-label-commenter@v1
|
||||||
|
2
.github/workflows/labeler.yml
vendored
2
.github/workflows/labeler.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
permissions: {}
|
permissions: {}
|
||||||
steps:
|
steps:
|
||||||
# https://github.com/peaceiris/actions-github-app-token
|
# https://github.com/peaceiris/actions-github-app-token
|
||||||
- uses: peaceiris/actions-github-app-token@v1.1.4
|
- uses: peaceiris/actions-github-app-token@v1.1.6
|
||||||
id: app
|
id: app
|
||||||
with:
|
with:
|
||||||
app_id: ${{ secrets.GH_APP_ID }}
|
app_id: ${{ secrets.GH_APP_ID }}
|
||||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -9,8 +9,8 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
# https://github.com/peaceiris/workflows/blob/main/create-release-npm/action.yml
|
# https://github.com/peaceiris/workflows/blob/main/create-release-npm/action.yml
|
||||||
- uses: peaceiris/workflows/create-release-npm@v0.17.1
|
- uses: peaceiris/workflows/create-release-npm@v0.20.1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
22
.github/workflows/test.yml
vendored
22
.github/workflows/test.yml
vendored
@ -27,21 +27,11 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Dump GitHub context
|
- uses: peaceiris/workflows/setup-node@v0.20.1
|
||||||
env:
|
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
||||||
run: echo "${GITHUB_CONTEXT}"
|
|
||||||
|
|
||||||
- name: Read .nvmrc
|
|
||||||
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
|
|
||||||
id: nvm
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
- name: Dump version
|
- name: Dump version
|
||||||
run: |
|
run: |
|
||||||
@ -71,12 +61,12 @@ jobs:
|
|||||||
- run: npm test
|
- run: npm test
|
||||||
|
|
||||||
- name: Upload test coverage as artifact
|
- name: Upload test coverage as artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coverage-${{ matrix.os }}
|
name: coverage-${{ matrix.os }}
|
||||||
path: coverage
|
path: coverage
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v3
|
- uses: codecov/codecov-action@v4
|
||||||
|
|
||||||
- name: Run ncc
|
- name: Run ncc
|
||||||
run: npm run build
|
run: npm run build
|
||||||
@ -89,7 +79,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup mdBook
|
- name: Setup mdBook
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
uses: peaceiris/actions-mdbook@v1.1.14
|
uses: peaceiris/actions-mdbook@v1.2.0
|
||||||
with:
|
with:
|
||||||
mdbook-version: '0.4.5'
|
mdbook-version: '0.4.5'
|
||||||
|
|
||||||
|
2
.github/workflows/update-major-tag.yml
vendored
2
.github/workflows/update-major-tag.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 1
|
timeout-minutes: 1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Update major tag
|
- name: Update major tag
|
||||||
run: |
|
run: |
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
npm ci
|
npm install
|
||||||
git remote prune origin
|
git remote prune origin
|
||||||
|
88
CHANGELOG.md
88
CHANGELOG.md
@ -2,6 +2,94 @@
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
# [4.0.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.9.3...v4.0.0) (2024-04-08)
|
||||||
|
|
||||||
|
|
||||||
|
### build
|
||||||
|
|
||||||
|
* node 20.11.1 ([5049354](https://github.com/peaceiris/actions-gh-pages/commit/5049354438ced05ab8a5da89ef20fd8efff107c7))
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* bump node16 to node20 (#1067) ([4eb285e](https://github.com/peaceiris/actions-gh-pages/commit/4eb285e828117bca26638192c3ed309c622e7bad)), closes [#1067](https://github.com/peaceiris/actions-gh-pages/issues/1067)
|
||||||
|
* downgrade engines.npm to 8.0.0 ([87231bc](https://github.com/peaceiris/actions-gh-pages/commit/87231bc03a428df52f90a00b3b9e6bef82f7daf9))
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* pin node-version to 18 (#981) ([65ebf11](https://github.com/peaceiris/actions-gh-pages/commit/65ebf11929c082120c54719c87069f0827d2084c)), closes [#981](https://github.com/peaceiris/actions-gh-pages/issues/981)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* add Release Strategy ([67f80d9](https://github.com/peaceiris/actions-gh-pages/commit/67f80d94a1668353e4733223685dcb84340c44b5))
|
||||||
|
* fix link to Nuxt github-pages (#980) ([88b4d2a](https://github.com/peaceiris/actions-gh-pages/commit/88b4d2aa927893f8976712406df9928468be3c88)), closes [#980](https://github.com/peaceiris/actions-gh-pages/issues/980)
|
||||||
|
* remove braces in if conditions (#920) ([0fbd122](https://github.com/peaceiris/actions-gh-pages/commit/0fbd12244217a1fa04396b8a52d911a436893771)), closes [#920](https://github.com/peaceiris/actions-gh-pages/issues/920)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.9.3](https://github.com/peaceiris/actions-gh-pages/compare/v3.9.2...v3.9.3) (2023-03-30)
|
||||||
|
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* fix typo, bump hugo version (#851) ([884a022](https://github.com/peaceiris/actions-gh-pages/commit/884a0224fd48faeb3bde89519e9d612d0585a679)), closes [#851](https://github.com/peaceiris/actions-gh-pages/issues/851)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* fix error handling (#841) ([32e33dc](https://github.com/peaceiris/actions-gh-pages/commit/32e33dcd3ae1d0cf56ac5a88267de6cbf0359353)), closes [#841](https://github.com/peaceiris/actions-gh-pages/issues/841)
|
||||||
|
* update known_hosts (#871) ([31c15f0](https://github.com/peaceiris/actions-gh-pages/commit/31c15f03292ac100ae41a50fd3055e00d1b11a32)), closes [#871](https://github.com/peaceiris/actions-gh-pages/issues/871)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.9.2](https://github.com/peaceiris/actions-gh-pages/compare/v3.9.1...v3.9.2) (2023-01-17)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* rename cicd ([32c9288](https://github.com/peaceiris/actions-gh-pages/commit/32c9288f553bbcbf66869cf553c82754431faf03))
|
||||||
|
* replace npm ci with install ([9839780](https://github.com/peaceiris/actions-gh-pages/commit/983978086a87d25a1ff678aa1ef4c2acc413784a))
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* add github-actions npm ([5e5dc6d](https://github.com/peaceiris/actions-gh-pages/commit/5e5dc6d02eeb18001e0a7af6d6fcbabd4fd9e2b7))
|
||||||
|
* enable automerge ([dd7d778](https://github.com/peaceiris/actions-gh-pages/commit/dd7d77895818fd15ebecf20b6bf76028d377e1b6))
|
||||||
|
* remove dependabot ([7af79a8](https://github.com/peaceiris/actions-gh-pages/commit/7af79a873e9c2b6c37690db94012342fdb90914a))
|
||||||
|
* remove enabledManagers ([cba22ba](https://github.com/peaceiris/actions-gh-pages/commit/cba22ba760f1c7e62c9ae43167ea68ca9de56506))
|
||||||
|
* use peaceiris/workflows/setup-node 0.19.1 (#818) ([416f539](https://github.com/peaceiris/actions-gh-pages/commit/416f539fb4263ec46f9bbee251e87cfeae9f85ff)), closes [#818](https://github.com/peaceiris/actions-gh-pages/issues/818)
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* apply npm audit fix (#809) ([e3aa46d](https://github.com/peaceiris/actions-gh-pages/commit/e3aa46d23bbf7f669a6d92c15dda089b2edf4959)), closes [#809](https://github.com/peaceiris/actions-gh-pages/issues/809)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.9.1](https://github.com/peaceiris/actions-gh-pages/compare/v3.9.0...v3.9.1) (2023-01-05)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* change cicd label name ([1808965](https://github.com/peaceiris/actions-gh-pages/commit/180896524151a5634ff5815a72c59467fc27c874))
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* add Renovate config (#802) ([072d16c](https://github.com/peaceiris/actions-gh-pages/commit/072d16c439270cd3a36c3e0977ccbe10f2b2bc55)), closes [#802](https://github.com/peaceiris/actions-gh-pages/issues/802)
|
||||||
|
* bump actions/dependency-review-action from 2 to 3 (#799) ([e3b45f2](https://github.com/peaceiris/actions-gh-pages/commit/e3b45f27007dc55bcdd52f01e38af6f61576ec7f)), closes [#799](https://github.com/peaceiris/actions-gh-pages/issues/799)
|
||||||
|
* bump peaceiris/actions-github-app-token from 1.1.4 to 1.1.5 (#798) ([a5f971f](https://github.com/peaceiris/actions-gh-pages/commit/a5f971f112fd50b6dd28469f23be2618b1ea87e7)), closes [#798](https://github.com/peaceiris/actions-gh-pages/issues/798)
|
||||||
|
* bump peaceiris/actions-mdbook from 1.1.14 to 1.2.0 (#793) ([9af6a68](https://github.com/peaceiris/actions-gh-pages/commit/9af6a68dde7720af8fd55364c2c637ca5922a879)), closes [#793](https://github.com/peaceiris/actions-gh-pages/issues/793)
|
||||||
|
* bump peaceiris/workflows from 0.17.1 to 0.17.2 (#794) ([087a759](https://github.com/peaceiris/actions-gh-pages/commit/087a759f907a127fdee23c8994321ff96f7d9430)), closes [#794](https://github.com/peaceiris/actions-gh-pages/issues/794)
|
||||||
|
* bump peaceiris/workflows from 0.17.2 to 0.18.1 (#806) ([f94667a](https://github.com/peaceiris/actions-gh-pages/commit/f94667a25cd2716a8a046111457e4b17c8c28407)), closes [#806](https://github.com/peaceiris/actions-gh-pages/issues/806)
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @actions/github from 5.0.1 to 5.1.1 (#785) ([679dbf0](https://github.com/peaceiris/actions-gh-pages/commit/679dbf02f69022f8c402975fdefe41ddb31516cd)), closes [#785](https://github.com/peaceiris/actions-gh-pages/issues/785)
|
||||||
|
* bump @actions/glob from 0.2.1 to 0.3.0 (#735) ([25b12e2](https://github.com/peaceiris/actions-gh-pages/commit/25b12e2a24490dbc96aa0d5201e94b1b4cca7fb0)), closes [#735](https://github.com/peaceiris/actions-gh-pages/issues/735)
|
||||||
|
* bump minimatch from 3.0.4 to 3.1.2 (#807) ([2f463a5](https://github.com/peaceiris/actions-gh-pages/commit/2f463a5ad59a66a5a83e0f072f6d556898e6cc9e)), closes [#807](https://github.com/peaceiris/actions-gh-pages/issues/807)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* replace deprecated set-output (#800) ([7166f2c](https://github.com/peaceiris/actions-gh-pages/commit/7166f2caa423717780ff24040f0163cbe511c18c)), closes [#800](https://github.com/peaceiris/actions-gh-pages/issues/800)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [3.9.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.8.0...v3.9.0) (2022-10-23)
|
# [3.9.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.8.0...v3.9.0) (2022-10-23)
|
||||||
|
|
||||||
|
|
||||||
|
202
README.md
202
README.md
@ -14,7 +14,7 @@ GitHub Pages Action
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
> **Note**
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
> See also the GitHub official GitHub Pages Action first.
|
> See also the GitHub official GitHub Pages Action first.
|
||||||
>
|
>
|
||||||
@ -30,7 +30,7 @@ The next example step will deploy `./public` directory to the remote `gh-pages`
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -111,6 +111,7 @@ Note that the `GITHUB_TOKEN` that is created by the runner might not inherently
|
|||||||
- [⭐️ First Deployment with `GITHUB_TOKEN`](#%EF%B8%8F-first-deployment-with-github_token)
|
- [⭐️ First Deployment with `GITHUB_TOKEN`](#%EF%B8%8F-first-deployment-with-github_token)
|
||||||
- [⭐️ Use the latest and specific release](#%EF%B8%8F-use-the-latest-and-specific-release)
|
- [⭐️ Use the latest and specific release](#%EF%B8%8F-use-the-latest-and-specific-release)
|
||||||
- [⭐️ Schedule and Manual Deployment](#%EF%B8%8F-schedule-and-manual-deployment)
|
- [⭐️ Schedule and Manual Deployment](#%EF%B8%8F-schedule-and-manual-deployment)
|
||||||
|
- [⭐️ Release Strategy](#%EF%B8%8F-release-strategy)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [⭐️ Static Site Generators with Node.js](#%EF%B8%8F-static-site-generators-with-nodejs)
|
- [⭐️ Static Site Generators with Node.js](#%EF%B8%8F-static-site-generators-with-nodejs)
|
||||||
- [⭐️ Gatsby](#%EF%B8%8F-gatsby)
|
- [⭐️ Gatsby](#%EF%B8%8F-gatsby)
|
||||||
@ -156,7 +157,7 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
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
|
||||||
@ -164,17 +165,17 @@ jobs:
|
|||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.101.0'
|
hugo-version: '0.110.0'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
# If you're changing the branch from main,
|
# If you're changing the branch from main,
|
||||||
# also change the `main` in `refs/heads/main`
|
# also change the `main` in `refs/heads/main`
|
||||||
# below accordingly.
|
# below accordingly.
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -200,7 +201,7 @@ A GitHub Actions runner automatically creates a `GITHUB_TOKEN` secret to use in
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -214,7 +215,7 @@ Read [Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key), create your SSH
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -226,7 +227,7 @@ Read [Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key), create your SSH
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
personal_token: ${{ secrets.PERSONAL_TOKEN }}
|
personal_token: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -239,7 +240,7 @@ The default is `gh-pages`.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_branch: your-branch # default: gh-pages
|
publish_branch: your-branch # default: gh-pages
|
||||||
@ -252,7 +253,7 @@ Only the contents of this dir are pushed to GitHub Pages branch, `gh-pages` by d
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./out # default: public
|
publish_dir: ./out # default: public
|
||||||
@ -267,7 +268,7 @@ A destination subdirectory on a publishing branch. The default is empty.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
destination_dir: subdir
|
destination_dir: subdir
|
||||||
@ -284,7 +285,7 @@ Values should be split with a comma.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
exclude_assets: '.github,exclude-file1,exclude-file2'
|
exclude_assets: '.github,exclude-file1,exclude-file2'
|
||||||
@ -294,7 +295,7 @@ Set `exclude_assets` to empty for including the `.github` directory to deploymen
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} # Recommended for this usage
|
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} # Recommended for this usage
|
||||||
# personal_token: ${{ secrets.PERSONAL_TOKEN }} # An alternative
|
# personal_token: ${{ secrets.PERSONAL_TOKEN }} # An alternative
|
||||||
@ -306,7 +307,7 @@ The `exclude_assets` option supports glob patterns.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
exclude_assets: '.github,exclude-file.txt,exclude-dir/**.txt'
|
exclude_assets: '.github,exclude-file.txt,exclude-dir/**.txt'
|
||||||
@ -321,7 +322,7 @@ For more details about the `CNAME` file, read the official documentation: [Manag
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -339,7 +340,7 @@ Bypassing Jekyll makes the deployment faster and is necessary if you are deployi
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -356,7 +357,7 @@ For example:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -376,7 +377,7 @@ For example:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -395,7 +396,7 @@ For example:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
external_repository: username/external-repository
|
external_repository: username/external-repository
|
||||||
@ -422,7 +423,7 @@ This allows you to make your publish branch with only the latest commit.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -436,7 +437,7 @@ A commit is always created with the same user.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -453,7 +454,7 @@ When we create a commit with a message `docs: Update some post`, a deployment co
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -467,7 +468,7 @@ use the `full_commit_message` option instead of the `commit_message` option.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -496,7 +497,7 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Some build
|
- name: Some build
|
||||||
|
|
||||||
@ -507,7 +508,7 @@ jobs:
|
|||||||
echo "DEPLOY_TAG_NAME=deploy-${TAG_NAME}" >> "${GITHUB_OUTPUT}"
|
echo "DEPLOY_TAG_NAME=deploy-${TAG_NAME}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -649,6 +650,49 @@ jobs:
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### ⭐️ Release Strategy
|
||||||
|
|
||||||
|
cf. [support: execution from hashref disabled/broken vs GitHub Actions Security Best Practice? · Issue #712 · peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages/issues/712)
|
||||||
|
|
||||||
|
Our project builds and provides build assets only when creating a release. This is to prevent the user from executing this action with a specific branch (like main). For example, if we maintain build assets in the main branch and users use this action as follows, a major release including breaking changes will break the CI workflow of the users silently.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: peaceiris/actions-gh-pages@main # Bad example!
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./public
|
||||||
|
```
|
||||||
|
|
||||||
|
In this project, a major tag (e.g. v3) is guaranteed to contain no breaking changes. But, we recommend using a tag or a commit hash for the stability of your workflows.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: peaceiris/actions-gh-pages@v4.0.0 # tag: Better
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./public
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # commit hash of v3.9.3: Best!
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./public
|
||||||
|
```
|
||||||
|
|
||||||
|
For verifying the release asset, we can use the following commands.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/peaceiris/actions-gh-pages.git
|
||||||
|
cd ./actions-gh-pages
|
||||||
|
git checkout v3.9.3
|
||||||
|
nvm install
|
||||||
|
nvm use
|
||||||
|
npm i -g npm
|
||||||
|
npm ci
|
||||||
|
npm run build
|
||||||
|
git diff ./lib/index.js # We will get zero exit code
|
||||||
|
```
|
||||||
|
|
||||||
<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>
|
||||||
@ -688,15 +732,15 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '24'
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@ -707,8 +751,8 @@ jobs:
|
|||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -738,15 +782,15 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '24'
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@ -759,8 +803,8 @@ jobs:
|
|||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -790,19 +834,19 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '24'
|
||||||
|
|
||||||
- name: Get yarn cache
|
- name: Get yarn cache
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
|
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
|
path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
@ -814,8 +858,8 @@ jobs:
|
|||||||
- run: yarn export
|
- run: yarn export
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./out
|
publish_dir: ./out
|
||||||
@ -825,7 +869,7 @@ jobs:
|
|||||||
|
|
||||||
An example for [Nuxt.js] (Vue.js) project with [create-nuxt-app]
|
An example for [Nuxt.js] (Vue.js) project with [create-nuxt-app]
|
||||||
|
|
||||||
- cf. [Nuxt - GitHub Pages](https://nuxtjs.org/integrations/deployments/github-pages)
|
- cf. [Nuxt - GitHub Pages](https://nuxtjs.org/deployments/github-pages)
|
||||||
|
|
||||||
[Nuxt.js]: https://github.com/nuxt/nuxt.js
|
[Nuxt.js]: https://github.com/nuxt/nuxt.js
|
||||||
[create-nuxt-app]: https://github.com/nuxt/create-nuxt-app
|
[create-nuxt-app]: https://github.com/nuxt/create-nuxt-app
|
||||||
@ -847,15 +891,15 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '24'
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@ -867,8 +911,8 @@ jobs:
|
|||||||
- run: npm run generate
|
- run: npm run generate
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./dist
|
publish_dir: ./dist
|
||||||
@ -905,19 +949,19 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
working-directory: website
|
working-directory: website
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '24'
|
||||||
|
|
||||||
- name: Get yarn cache
|
- name: Get yarn cache
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
|
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
|
path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
|
||||||
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
|
||||||
@ -928,8 +972,8 @@ jobs:
|
|||||||
- run: yarn build
|
- run: yarn build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./website/build
|
publish_dir: ./website/build
|
||||||
@ -962,12 +1006,12 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.13'
|
||||||
|
|
||||||
- name: Upgrade pip
|
- name: Upgrade pip
|
||||||
run: |
|
run: |
|
||||||
@ -976,10 +1020,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Get pip cache dir
|
- name: Get pip cache dir
|
||||||
id: pip-cache
|
id: pip-cache
|
||||||
run: echo "::set-output name=dir::$(pip cache dir)"
|
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
@ -992,8 +1036,8 @@ jobs:
|
|||||||
- run: mkdocs build
|
- run: mkdocs build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./site
|
publish_dir: ./site
|
||||||
@ -1024,7 +1068,7 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup mdBook
|
- name: Setup mdBook
|
||||||
uses: peaceiris/actions-mdbook@v1
|
uses: peaceiris/actions-mdbook@v1
|
||||||
@ -1035,8 +1079,8 @@ jobs:
|
|||||||
- run: mdbook build
|
- run: mdbook build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./book
|
publish_dir: ./book
|
||||||
@ -1069,7 +1113,7 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Flutter
|
- name: Setup Flutter
|
||||||
run: |
|
run: |
|
||||||
@ -1085,8 +1129,8 @@ jobs:
|
|||||||
run: flutter build web
|
run: flutter build web
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./build/web
|
publish_dir: ./build/web
|
||||||
@ -1115,12 +1159,12 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '24'
|
||||||
|
|
||||||
- name: Setup Elm
|
- name: Setup Elm
|
||||||
run: npm install elm --global
|
run: npm install elm --global
|
||||||
@ -1136,8 +1180,8 @@ jobs:
|
|||||||
# provide --output=<output-file> option for `elm make` and remove this step
|
# provide --output=<output-file> option for `elm make` and remove this step
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -1164,9 +1208,9 @@ jobs:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/Publish_build
|
~/Publish_build
|
||||||
@ -1189,8 +1233,8 @@ jobs:
|
|||||||
- run: publish-cli generate
|
- run: publish-cli generate
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: github.ref == 'refs/heads/main'
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./Output
|
publish_dir: ./Output
|
||||||
|
@ -184,6 +184,6 @@ describe('getInputs()', () => {
|
|||||||
|
|
||||||
expect(() => {
|
expect(() => {
|
||||||
getInputs();
|
getInputs();
|
||||||
}).toThrowError('Use either of enable_jekyll or disable_nojekyll');
|
}).toThrow('Use either of enable_jekyll or disable_nojekyll');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -148,7 +148,7 @@ describe('setRepo()', () => {
|
|||||||
const date = new Date();
|
const date = new Date();
|
||||||
const unixTime = date.getTime();
|
const unixTime = date.getTime();
|
||||||
const workDir = await getWorkDirName(`${unixTime}`);
|
const workDir = await getWorkDirName(`${unixTime}`);
|
||||||
await expect(setRepo(inps, remoteURL, workDir)).rejects.toThrowError(
|
await expect(setRepo(inps, remoteURL, workDir)).rejects.toThrow(
|
||||||
'destination_dir should be a relative path'
|
'destination_dir should be a relative path'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -241,17 +241,13 @@ describe('setCommitAuthor()', () => {
|
|||||||
test('throw error user_email is undefined', async () => {
|
test('throw error user_email is undefined', async () => {
|
||||||
const userName = 'custom-octocat';
|
const userName = 'custom-octocat';
|
||||||
const userEmail = '';
|
const userEmail = '';
|
||||||
await expect(setCommitAuthor(userName, userEmail)).rejects.toThrowError(
|
await expect(setCommitAuthor(userName, userEmail)).rejects.toThrow('user_email is undefined');
|
||||||
'user_email is undefined'
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('throw error user_name is undefined', async () => {
|
test('throw error user_name is undefined', async () => {
|
||||||
const userName = '';
|
const userName = '';
|
||||||
const userEmail = 'custom-octocat@github.com';
|
const userEmail = 'custom-octocat@github.com';
|
||||||
await expect(setCommitAuthor(userName, userEmail)).rejects.toThrowError(
|
await expect(setCommitAuthor(userName, userEmail)).rejects.toThrow('user_name is undefined');
|
||||||
'user_name is undefined'
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -70,13 +70,13 @@ describe('setGithubToken()', () => {
|
|||||||
'refs/heads/gh-pages-base',
|
'refs/heads/gh-pages-base',
|
||||||
'push'
|
'push'
|
||||||
);
|
);
|
||||||
}).toThrowError('You deploy from gh-pages-base to gh-pages-base');
|
}).toThrow('You deploy from gh-pages-base to gh-pages-base');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('throw error master to master', () => {
|
test('throw error master to master', () => {
|
||||||
expect(() => {
|
expect(() => {
|
||||||
setGithubToken('GITHUB_TOKEN', 'owner/repo', 'master', '', 'refs/heads/master', 'push');
|
setGithubToken('GITHUB_TOKEN', 'owner/repo', 'master', '', 'refs/heads/master', 'push');
|
||||||
}).toThrowError('You deploy from master to master');
|
}).toThrow('You deploy from master to master');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('throw error external repository with GITHUB_TOKEN', () => {
|
test('throw error external repository with GITHUB_TOKEN', () => {
|
||||||
@ -89,7 +89,7 @@ describe('setGithubToken()', () => {
|
|||||||
'refs/heads/master',
|
'refs/heads/master',
|
||||||
'push'
|
'push'
|
||||||
);
|
);
|
||||||
}).toThrowError(`\
|
}).toThrow(`\
|
||||||
The generated GITHUB_TOKEN (github_token) does not support to push to an external repository.
|
The generated GITHUB_TOKEN (github_token) does not support to push to an external repository.
|
||||||
Use deploy_key or personal_token.
|
Use deploy_key or personal_token.
|
||||||
`);
|
`);
|
||||||
|
@ -2,7 +2,7 @@ name: 'GitHub Pages action'
|
|||||||
description: 'GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.'
|
description: 'GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.'
|
||||||
author: 'peaceiris'
|
author: 'peaceiris'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node20'
|
||||||
main: 'lib/index.js'
|
main: 'lib/index.js'
|
||||||
branding:
|
branding:
|
||||||
icon: 'upload-cloud'
|
icon: 'upload-cloud'
|
||||||
|
File diff suppressed because one or more lines are too long
11840
package-lock.json
generated
11840
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
46
package.json
46
package.json
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "actions-github-pages",
|
"name": "actions-github-pages",
|
||||||
"version": "3.9.0",
|
"version": "4.0.0",
|
||||||
"description": "GitHub Actions for GitHub Pages",
|
"description": "GitHub Actions for GitHub Pages",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.18.0",
|
"node": ">=v20.11.0",
|
||||||
"npm": ">=8.19.0"
|
"npm": ">=10.2.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "npx husky install",
|
"postinstall": "npx husky install",
|
||||||
@ -49,31 +49,31 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/github": "^5.0.1",
|
"@actions/github": "^5.1.1",
|
||||||
"@actions/glob": "^0.2.1",
|
"@actions/glob": "^0.5.0",
|
||||||
"@actions/io": "^1.1.2",
|
"@actions/io": "^1.1.2",
|
||||||
"@types/shelljs": "^0.8.11",
|
"@types/shelljs": "^0.8.11",
|
||||||
"shelljs": "^0.8.5"
|
"shelljs": "^0.8.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.20",
|
"@types/jest": "^29.2.6",
|
||||||
"@types/js-yaml": "^4.0.0",
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/node": "~12",
|
"@types/node": "~16",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.16.1",
|
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
||||||
"@typescript-eslint/parser": "^4.16.1",
|
"@typescript-eslint/parser": "^5.48.2",
|
||||||
"@vercel/ncc": "^0.27.0",
|
"@vercel/ncc": "^0.38.0",
|
||||||
"eslint": "^7.21.0",
|
"eslint": "^8.32.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-plugin-jest": "^24.1.5",
|
"eslint-plugin-jest": "^27.2.1",
|
||||||
"eslint-plugin-prettier": "^3.3.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"husky": "^5.1.3",
|
"husky": "^8.0.3",
|
||||||
"jest": "^26.6.3",
|
"jest": "^29.3.1",
|
||||||
"jest-circus": "^26.6.3",
|
"jest-circus": "^29.3.1",
|
||||||
"js-yaml": "^4.0.0",
|
"js-yaml": "^4.1.0",
|
||||||
"lint-staged": "^10.5.4",
|
"lint-staged": "^13.1.0",
|
||||||
"prettier": "2.2.1",
|
"prettier": "2.8.8",
|
||||||
"standard-version": "^9.1.1",
|
"standard-version": "^9.1.1",
|
||||||
"ts-jest": "^26.5.3",
|
"ts-jest": "^29.0.5",
|
||||||
"typescript": "^4.2.3"
|
"typescript": "^4.9.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ else
|
|||||||
git pull origin --tags
|
git pull origin --tags
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm ci
|
npm install
|
||||||
|
|
||||||
mkdir ./lib
|
mkdir ./lib
|
||||||
npm run build
|
npm run build
|
||||||
|
13
renovate.json
Normal file
13
renovate.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>peaceiris/renovate-config"
|
||||||
|
],
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"automerge": false,
|
||||||
|
"matchUpdateTypes": ["minor", "patch"],
|
||||||
|
"automergeStrategy": "squash"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -127,15 +127,19 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
|
|||||||
} else {
|
} else {
|
||||||
throw new Error(`Failed to clone remote branch ${inps.PublishBranch}`);
|
throw new Error(`Failed to clone remote branch ${inps.PublishBranch}`);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
core.info(`[INFO] first deployment, create new branch ${inps.PublishBranch}`);
|
if (error instanceof Error) {
|
||||||
core.info(`[INFO] ${e.message}`);
|
core.info(`[INFO] first deployment, create new branch ${inps.PublishBranch}`);
|
||||||
await createDir(destDir);
|
core.info(`[INFO] ${error.message}`);
|
||||||
core.info(`[INFO] chdir ${workDir}`);
|
await createDir(destDir);
|
||||||
process.chdir(workDir);
|
core.info(`[INFO] chdir ${workDir}`);
|
||||||
await createBranchForce(inps.PublishBranch);
|
process.chdir(workDir);
|
||||||
await copyAssets(publishDir, destDir, inps.ExcludeAssets);
|
await createBranchForce(inps.PublishBranch);
|
||||||
return;
|
await copyAssets(publishDir, destDir, inps.ExcludeAssets);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
throw new Error('unexpected error');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,9 +205,13 @@ export async function commit(allowEmptyCommit: boolean, msg: string): Promise<vo
|
|||||||
} else {
|
} else {
|
||||||
await exec.exec('git', ['commit', '-m', `${msg}`]);
|
await exec.exec('git', ['commit', '-m', `${msg}`]);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
core.info('[INFO] skip commit');
|
if (error instanceof Error) {
|
||||||
core.debug(`[INFO] skip commit ${e.message}`);
|
core.info('[INFO] skip commit');
|
||||||
|
core.debug(`[INFO] skip commit ${error.message}`);
|
||||||
|
} else {
|
||||||
|
throw new Error('unexpected error');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,11 @@ import * as main from './main';
|
|||||||
(async (): Promise<void> => {
|
(async (): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
await main.run();
|
await main.run();
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
core.setFailed(`Action failed with "${e.message}"`);
|
if (error instanceof Error) {
|
||||||
|
core.setFailed(`Action failed with "${error.message}"`);
|
||||||
|
} else {
|
||||||
|
core.setFailed('unexpected error');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
16
src/main.ts
16
src/main.ts
@ -57,8 +57,12 @@ export async function run(): Promise<void> {
|
|||||||
core.startGroup('Setup Git config');
|
core.startGroup('Setup Git config');
|
||||||
try {
|
try {
|
||||||
await exec.exec('git', ['remote', 'rm', 'origin']);
|
await exec.exec('git', ['remote', 'rm', 'origin']);
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
core.info(`[INFO] ${e.message}`);
|
if (error instanceof Error) {
|
||||||
|
core.info(`[INFO] ${error.message}`);
|
||||||
|
} else {
|
||||||
|
throw new Error('unexpected error');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await exec.exec('git', ['remote', 'add', 'origin', remoteURL]);
|
await exec.exec('git', ['remote', 'add', 'origin', remoteURL]);
|
||||||
await exec.exec('git', ['add', '--all']);
|
await exec.exec('git', ['add', '--all']);
|
||||||
@ -86,7 +90,11 @@ export async function run(): Promise<void> {
|
|||||||
core.info('[INFO] Action successfully completed');
|
core.info('[INFO] Action successfully completed');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
throw new Error(e.message);
|
if (error instanceof Error) {
|
||||||
|
throw new Error(error.message);
|
||||||
|
} else {
|
||||||
|
throw new Error('unexpected error');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ export async function setSSHKey(inps: Inputs, publishRepo: string): Promise<stri
|
|||||||
# ${getServerUrl().host}.com:22 SSH-2.0-babeld-1f0633a6
|
# ${getServerUrl().host}.com:22 SSH-2.0-babeld-1f0633a6
|
||||||
${
|
${
|
||||||
getServerUrl().host
|
getServerUrl().host
|
||||||
} ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
|
} ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=
|
||||||
`;
|
`;
|
||||||
fs.writeFileSync(knownHosts, cmdSSHkeyscanOutput + '\n');
|
fs.writeFileSync(knownHosts, cmdSSHkeyscanOutput + '\n');
|
||||||
core.info(`[INFO] wrote ${knownHosts}`);
|
core.info(`[INFO] wrote ${knownHosts}`);
|
||||||
@ -138,7 +138,11 @@ export async function setTokens(inps: Inputs): Promise<string> {
|
|||||||
} else {
|
} else {
|
||||||
throw new Error('not found deploy key or tokens');
|
throw new Error('not found deploy key or tokens');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
throw new Error(e.message);
|
if (error instanceof Error) {
|
||||||
|
throw new Error(error.message);
|
||||||
|
} else {
|
||||||
|
throw new Error('unexpected error');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user