mirror of
https://github.com/actions/configure-pages.git
synced 2025-12-09 00:26:08 +00:00
Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5606572c4 | ||
|
|
35e0ac4e40 | ||
|
|
1dfbcbff65 | ||
|
|
2f4f988792 | ||
|
|
0d7570ca87 | ||
|
|
3ea19669a5 | ||
|
|
aabcbc432d | ||
|
|
0b64e3413e | ||
|
|
dc1038695c | ||
|
|
dd21a8346d | ||
|
|
a530a34c2e | ||
|
|
d624ed25e2 | ||
|
|
577583143f | ||
|
|
0c410175d2 | ||
|
|
fda53c8981 | ||
|
|
4374381e41 | ||
|
|
01f6e1ea62 | ||
|
|
b7a5f35d29 | ||
|
|
c3ccc393c9 | ||
|
|
197d7ac03c | ||
|
|
e1bedb3777 | ||
|
|
c872373d57 | ||
|
|
34b0311f68 | ||
|
|
983d7736d9 | ||
|
|
9cf6e24f74 | ||
|
|
f304bd89be | ||
|
|
215cd51eb0 | ||
|
|
e9382ac9ad | ||
|
|
7781abd34b | ||
|
|
fc47e3c838 | ||
|
|
9c9f8a266f | ||
|
|
9a4705d653 | ||
|
|
f6ded38287 | ||
|
|
b974ee5c49 | ||
|
|
1c5932fc39 | ||
|
|
b85f2a60ec | ||
|
|
d14bd2c02d | ||
|
|
2a4661c528 | ||
|
|
ec1a48e993 | ||
|
|
47ae4dc929 | ||
|
|
a80ba3c251 | ||
|
|
150fac6047 | ||
|
|
b490f538fb | ||
|
|
91c6f66f8c | ||
|
|
1d58abcaf6 | ||
|
|
80035486b6 | ||
|
|
15fac61a41 | ||
|
|
e4a9b007f8 | ||
|
|
c0843f47a2 | ||
|
|
0ac25789ae | ||
|
|
53931f9905 | ||
|
|
6e9d0f5c03 | ||
|
|
649f50cc18 | ||
|
|
448d4dc137 | ||
|
|
5391e9cec8 | ||
|
|
7532334a8e | ||
|
|
8f0d84851b | ||
|
|
02a1839bae |
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -4,8 +4,14 @@ updates:
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: 'weekly'
|
||||
groups:
|
||||
non-breaking-changes:
|
||||
update-types: [minor, patch]
|
||||
|
||||
- package-ecosystem: 'npm'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: 'weekly'
|
||||
groups:
|
||||
non-breaking-changes:
|
||||
update-types: [minor, patch]
|
||||
|
||||
4
.github/workflows/check-dist.yml
vendored
4
.github/workflows/check-dist.yml
vendored
@@ -29,10 +29,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'npm'
|
||||
|
||||
4
.github/workflows/check-formatting.yml
vendored
4
.github/workflows/check-formatting.yml
vendored
@@ -20,10 +20,10 @@ jobs:
|
||||
timeout-minutes: 2
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'npm'
|
||||
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@@ -38,11 +38,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -67,4 +67,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
||||
4
.github/workflows/draft-release.yml
vendored
4
.github/workflows/draft-release.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
draft-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
- uses: actions/checkout@v4
|
||||
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@@ -20,10 +20,10 @@ jobs:
|
||||
timeout-minutes: 2
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: npm
|
||||
|
||||
20
.github/workflows/publish-immutable-actions.yml
vendored
Normal file
20
.github/workflows/publish-immutable-actions.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: 'Publish Immutable Action Version'
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checking out
|
||||
uses: actions/checkout@v4
|
||||
- name: Publish
|
||||
id: publish
|
||||
uses: actions/publish-immutable-action@0.0.3
|
||||
6
.github/workflows/rebuild-dependabot-prs.yml
vendored
6
.github/workflows/rebuild-dependabot-prs.yml
vendored
@@ -19,12 +19,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.PAGES_AUTOMATION_PAT }}
|
||||
|
||||
- name: Setup Node.JS
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'npm'
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
git add dist/
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git commit -m "Update distributables after Dependabot 🤖"
|
||||
git commit -m "[dependabot skip] Update distributables after Dependabot 🤖"
|
||||
echo "Pushing branch ${{ github.ref_name }}"
|
||||
git push origin ${{ github.ref_name }}
|
||||
fi
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
steps:
|
||||
- name: Update the ${{ env.TAG_NAME }} tag
|
||||
id: update-major-tag
|
||||
uses: actions/publish-action@v0.2.2
|
||||
uses: actions/publish-action@v0.3.0
|
||||
with:
|
||||
source-tag: ${{ env.TAG_NAME }}
|
||||
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -19,10 +19,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.JS
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'npm'
|
||||
|
||||
33212
dist/index.js
vendored
33212
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
194
dist/licenses.txt
vendored
194
dist/licenses.txt
vendored
@@ -47,6 +47,28 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@fastify/busboy
|
||||
MIT
|
||||
Copyright Brian White. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
||||
@octokit/auth-token
|
||||
MIT
|
||||
The MIT License
|
||||
@@ -219,16 +241,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@vercel/ncc
|
||||
MIT
|
||||
Copyright 2018 ZEIT, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
acorn
|
||||
MIT
|
||||
MIT License
|
||||
@@ -501,6 +513,29 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
error-stack-parser
|
||||
MIT
|
||||
Copyright (c) 2017 Eric Wendelin and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
eslint-visitor-keys
|
||||
Apache-2.0
|
||||
Apache License
|
||||
@@ -735,57 +770,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
is-plain-object
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
node-fetch
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 David Frank
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
|
||||
once
|
||||
ISC
|
||||
The ISC License
|
||||
@@ -805,8 +789,28 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
tr46
|
||||
stackframe
|
||||
MIT
|
||||
Copyright (c) 2017 Eric Wendelin and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
tunnel
|
||||
MIT
|
||||
@@ -833,6 +837,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
undici
|
||||
MIT
|
||||
MIT License
|
||||
|
||||
Copyright (c) Matteo Collina and Undici contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
universal-user-agent
|
||||
ISC
|
||||
# [ISC License](https://spdx.org/licenses/ISC)
|
||||
@@ -857,47 +886,6 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
webidl-conversions
|
||||
BSD-2-Clause
|
||||
# The BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2014, Domenic Denicola
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
whatwg-url
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015–2016 Sebastian Mayr
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
wrappy
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
1190
package-lock.json
generated
1190
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@@ -24,15 +24,17 @@
|
||||
},
|
||||
"homepage": "https://github.com/actions/configure-pages#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/github": "^5.1.1",
|
||||
"espree": "^9.6.1"
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/github": "^6.0.0",
|
||||
"error-stack-parser": "^2.1.4",
|
||||
"espree": "^10.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"eslint": "^8.40.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-github": "^4.10.1",
|
||||
"@octokit/request-error": "^5.0.1",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-github": "^5.0.1",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^2.8.7"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const core = require('@actions/core')
|
||||
const github = require('@actions/github')
|
||||
const { convertErrorToAnnotationProperties } = require('./error-utils')
|
||||
|
||||
async function enablePagesSite({ githubToken }) {
|
||||
const octokit = github.getOctokit(githubToken)
|
||||
@@ -43,12 +44,12 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
|
||||
} catch (error) {
|
||||
if (!enablement) {
|
||||
core.error(
|
||||
'Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action.',
|
||||
error
|
||||
`Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the \`enablement\` parameter for this action. Error: ${error.message}`,
|
||||
convertErrorToAnnotationProperties(error)
|
||||
)
|
||||
throw error
|
||||
}
|
||||
core.warning('Get Pages site failed', error)
|
||||
core.warning(`Get Pages site failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
|
||||
}
|
||||
|
||||
if (!pageObject && enablement) {
|
||||
@@ -56,7 +57,7 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
|
||||
try {
|
||||
pageObject = await enablePagesSite({ githubToken })
|
||||
} catch (error) {
|
||||
core.error('Create Pages site failed', error)
|
||||
core.error(`Create Pages site failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
|
||||
throw error
|
||||
}
|
||||
|
||||
@@ -66,7 +67,7 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
|
||||
try {
|
||||
pageObject = await getPagesSite({ githubToken })
|
||||
} catch (error) {
|
||||
core.error('Get Pages site still failed', error)
|
||||
core.error(`Get Pages site still failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
const core = require('@actions/core')
|
||||
const apiClient = require('./api-client')
|
||||
const { RequestError } = require('@octokit/request-error')
|
||||
|
||||
const mockGetPages = jest.fn()
|
||||
const mockCreatePagesSite = jest.fn()
|
||||
|
||||
const generateRequestError = statusCode => {
|
||||
const fakeRequest = { headers: {}, url: '/' }
|
||||
const fakeResponse = { status: statusCode }
|
||||
let message = 'Oops'
|
||||
if (statusCode === 404) {
|
||||
message = 'Not Found'
|
||||
}
|
||||
if (statusCode === 409) {
|
||||
message = 'Too Busy'
|
||||
}
|
||||
const error = new RequestError(message, statusCode, { request: fakeRequest, response: fakeResponse })
|
||||
return error
|
||||
}
|
||||
|
||||
jest.mock('@actions/github', () => ({
|
||||
context: {
|
||||
repo: {
|
||||
@@ -48,7 +63,7 @@ describe('apiClient', () => {
|
||||
})
|
||||
|
||||
it('handles a 409 response when the page already exists', async () => {
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject({ response: { status: 409 } }))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject(generateRequestError(409)))
|
||||
|
||||
// Simply assert that no error is raised
|
||||
const result = await apiClient.enablePagesSite({
|
||||
@@ -59,7 +74,7 @@ describe('apiClient', () => {
|
||||
})
|
||||
|
||||
it('re-raises errors on failure status codes', async () => {
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject({ response: { status: 404 } }))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject(generateRequestError(404)))
|
||||
|
||||
let erred = false
|
||||
try {
|
||||
@@ -86,7 +101,7 @@ describe('apiClient', () => {
|
||||
})
|
||||
|
||||
it('re-raises errors on failure status codes', async () => {
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject({ response: { status: 404 } }))
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject(generateRequestError(404)))
|
||||
|
||||
let erred = false
|
||||
try {
|
||||
@@ -105,7 +120,7 @@ describe('apiClient', () => {
|
||||
it('does not make a request to create a page if it already exists', async () => {
|
||||
const PAGE_OBJECT = { html_url: 'https://actions.github.io/is-awesome/' }
|
||||
mockGetPages.mockImplementationOnce(() => Promise.resolve({ status: 200, data: PAGE_OBJECT }))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject({ response: { status: 404 } }))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject(generateRequestError(404)))
|
||||
|
||||
const result = await apiClient.findOrCreatePagesSite({
|
||||
githubToken: GITHUB_TOKEN
|
||||
@@ -117,7 +132,7 @@ describe('apiClient', () => {
|
||||
|
||||
it('makes request to create a page by default if it does not exist', async () => {
|
||||
const PAGE_OBJECT = { html_url: 'https://actions.github.io/is-awesome/' }
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject({ response: { status: 404 } }))
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject(generateRequestError(404)))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.resolve({ status: 201, data: PAGE_OBJECT }))
|
||||
|
||||
const result = await apiClient.findOrCreatePagesSite({
|
||||
@@ -130,7 +145,7 @@ describe('apiClient', () => {
|
||||
|
||||
it('makes a request to create a page when explicitly enabled if it does not exist', async () => {
|
||||
const PAGE_OBJECT = { html_url: 'https://actions.github.io/is-awesome/' }
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject({ response: { status: 404 } }))
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject(generateRequestError(404)))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.resolve({ status: 201, data: PAGE_OBJECT }))
|
||||
|
||||
const result = await apiClient.findOrCreatePagesSite({
|
||||
@@ -143,8 +158,8 @@ describe('apiClient', () => {
|
||||
})
|
||||
|
||||
it('does not make a request to create a page when explicitly disabled even if it does not exist', async () => {
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject({ response: { status: 404 } }))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject({ response: { status: 500 } })) // just so they both aren't 404
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject(generateRequestError(404)))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject(generateRequestError(500))) // just so they both aren't 404
|
||||
|
||||
let erred = false
|
||||
try {
|
||||
@@ -163,8 +178,8 @@ describe('apiClient', () => {
|
||||
})
|
||||
|
||||
it('does not make a second request to get page if create fails for reason other than existence', async () => {
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject({ response: { status: 404 } }))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject({ response: { status: 500 } })) // just so they both aren't 404
|
||||
mockGetPages.mockImplementationOnce(() => Promise.reject(generateRequestError(404)))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject(generateRequestError(500))) // just so they both aren't 404
|
||||
|
||||
let erred = false
|
||||
try {
|
||||
@@ -184,9 +199,9 @@ describe('apiClient', () => {
|
||||
it('makes second request to get page if create fails because of existence', async () => {
|
||||
const PAGE_OBJECT = { html_url: 'https://actions.github.io/is-awesome/' }
|
||||
mockGetPages
|
||||
.mockImplementationOnce(() => Promise.reject({ response: { status: 404 } }))
|
||||
.mockImplementationOnce(() => Promise.reject(generateRequestError(404)))
|
||||
.mockImplementationOnce(() => Promise.resolve({ status: 200, data: PAGE_OBJECT }))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject({ response: { status: 409 } }))
|
||||
mockCreatePagesSite.mockImplementationOnce(() => Promise.reject(generateRequestError(409)))
|
||||
|
||||
const result = await apiClient.findOrCreatePagesSite({
|
||||
githubToken: GITHUB_TOKEN
|
||||
|
||||
24
src/error-utils.js
Normal file
24
src/error-utils.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const ErrorStackParser = require('error-stack-parser')
|
||||
|
||||
// Convert an Error's stack into `@actions/core` toolkit AnnotationProperties:
|
||||
// https://github.com/actions/toolkit/blob/ef77c9d60bdb03700d7758b0d04b88446e72a896/packages/core/src/core.ts#L36-L71
|
||||
function convertErrorToAnnotationProperties(error, title = error.name) {
|
||||
if (!(error instanceof Error)) {
|
||||
throw new TypeError('error must be an instance of Error')
|
||||
}
|
||||
|
||||
const stack = ErrorStackParser.parse(error)
|
||||
const firstFrame = stack && stack.length > 0 ? stack[0] : null
|
||||
if (!firstFrame) {
|
||||
throw new Error('Error stack is empty or unparseable')
|
||||
}
|
||||
|
||||
return {
|
||||
title,
|
||||
file: firstFrame.fileName,
|
||||
startLine: firstFrame.lineNumber,
|
||||
startColumn: firstFrame.columnNumber
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { convertErrorToAnnotationProperties }
|
||||
38
src/error-utils.test.js
Normal file
38
src/error-utils.test.js
Normal file
@@ -0,0 +1,38 @@
|
||||
const { convertErrorToAnnotationProperties } = require('./error-utils')
|
||||
|
||||
describe('error-utils', () => {
|
||||
describe('convertErrorToAnnotationProperties', () => {
|
||||
it('throws a TypeError if the first argument is not an Error instance', () => {
|
||||
expect(() => convertErrorToAnnotationProperties('not an Error')).toThrow(
|
||||
TypeError,
|
||||
'error must be an instance of Error'
|
||||
)
|
||||
})
|
||||
|
||||
it('throws an Error if the first argument is an Error instance without a parseable stack', () => {
|
||||
const error = new Error('Test error')
|
||||
error.stack = ''
|
||||
expect(() => convertErrorToAnnotationProperties(error)).toThrow(Error, 'Error stack is empty or unparseable')
|
||||
})
|
||||
|
||||
it('returns an AnnotationProperties-compatible object', () => {
|
||||
const result = convertErrorToAnnotationProperties(new TypeError('Test error'))
|
||||
expect(result).toEqual({
|
||||
title: 'TypeError',
|
||||
file: __filename,
|
||||
startLine: expect.any(Number),
|
||||
startColumn: expect.any(Number)
|
||||
})
|
||||
})
|
||||
|
||||
it('returns an AnnotationProperties-compatible object with a custom title', () => {
|
||||
const result = convertErrorToAnnotationProperties(new TypeError('Test error'), 'custom title')
|
||||
expect(result).toEqual({
|
||||
title: 'custom title',
|
||||
file: __filename,
|
||||
startLine: expect.any(Number),
|
||||
startColumn: expect.any(Number)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -1,3 +1,3 @@
|
||||
// Default Pages configuration for Next
|
||||
const nextConfig = { images: { unoptimized: true }, experimental: { images: { unoptimized: true } }, basePath: '/docs' }
|
||||
const nextConfig = { images: { unoptimized: true }, basePath: '/docs', output: 'export' }
|
||||
module.exports = nextConfig
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
images: { unoptimized: true },
|
||||
experimental: { images: { unoptimized: true } },
|
||||
basePath: '/docs',
|
||||
output: 'export',
|
||||
reactStrictMode: true,
|
||||
swcMinify: true
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
images: { unoptimized: true },
|
||||
experimental: { images: { unoptimized: true } },
|
||||
basePath: '/docs',
|
||||
output: 'export',
|
||||
reactStrictMode: true,
|
||||
swcMinify: true
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
images: { unoptimized: true },
|
||||
experimental: { images: { unoptimized: true } },
|
||||
basePath: '/docs',
|
||||
output: 'export',
|
||||
reactStrictMode: true,
|
||||
swcMinify: true
|
||||
}
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
const fs = require('fs')
|
||||
const core = require('@actions/core')
|
||||
const { ConfigParser } = require('./config-parser')
|
||||
const removeTrailingSlash = require('./remove-trailing-slash')
|
||||
const { convertErrorToAnnotationProperties } = require('./error-utils')
|
||||
|
||||
const SUPPORTED_FILE_EXTENSIONS = ['.js', '.cjs', '.mjs']
|
||||
|
||||
function detectOrDefaultConfigFile(fileBaseName, defaultExt = '.js') {
|
||||
for (const ext of SUPPORTED_FILE_EXTENSIONS) {
|
||||
const potentialConfigFile = `./${fileBaseName}${ext}`
|
||||
if (fs.existsSync(potentialConfigFile)) {
|
||||
return potentialConfigFile
|
||||
}
|
||||
}
|
||||
// If none of them exist yet, fall back to returning the filename with the defaultExt extension
|
||||
return `./${fileBaseName}${defaultExt}`
|
||||
}
|
||||
|
||||
// Return the settings to be passed to a {ConfigParser} for a given static site generator,
|
||||
// optional configuration file path, and a Pages siteUrl value to inject
|
||||
function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
|
||||
@@ -12,7 +25,7 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
|
||||
switch (staticSiteGenerator) {
|
||||
case 'nuxt':
|
||||
return {
|
||||
configurationFile: generatorConfigFile || './nuxt.config.js',
|
||||
configurationFile: generatorConfigFile || detectOrDefaultConfigFile('nuxt.config'),
|
||||
blankConfigurationFile: `${__dirname}/blank-configurations/nuxt.js`,
|
||||
properties: {
|
||||
// Configure a base path on the router
|
||||
@@ -28,22 +41,25 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
|
||||
path = removeTrailingSlash(path)
|
||||
|
||||
return {
|
||||
configurationFile: generatorConfigFile || './next.config.js',
|
||||
configurationFile: generatorConfigFile || detectOrDefaultConfigFile('next.config'),
|
||||
blankConfigurationFile: `${__dirname}/blank-configurations/next.js`,
|
||||
properties: {
|
||||
// Static export
|
||||
// https://nextjs.org/docs/app/building-your-application/deploying/static-exports#version-history
|
||||
output: 'export',
|
||||
|
||||
// Configure a base path
|
||||
// https://nextjs.org/docs/app/api-reference/next-config-js/basePath
|
||||
basePath: path,
|
||||
|
||||
// Disable server side image optimization too
|
||||
// https://nextjs.org/docs/api-reference/next/image#unoptimized
|
||||
'experimental.images.unoptimized': true,
|
||||
// No longer experimental as of Next.js v12.3.0
|
||||
'images.unoptimized': true
|
||||
}
|
||||
}
|
||||
case 'gatsby':
|
||||
return {
|
||||
configurationFile: generatorConfigFile || './gatsby-config.js',
|
||||
configurationFile: generatorConfigFile || detectOrDefaultConfigFile('gatsby-config'),
|
||||
blankConfigurationFile: `${__dirname}/blank-configurations/gatsby.js`,
|
||||
properties: {
|
||||
// Configure a path prefix
|
||||
@@ -57,7 +73,7 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
|
||||
path = removeTrailingSlash(path)
|
||||
|
||||
return {
|
||||
configurationFile: generatorConfigFile || './svelte.config.js',
|
||||
configurationFile: generatorConfigFile || detectOrDefaultConfigFile('svelte.config'),
|
||||
blankConfigurationFile: `${__dirname}/blank-configurations/sveltekit.js`,
|
||||
properties: {
|
||||
// Configure a base path
|
||||
@@ -73,27 +89,23 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
|
||||
|
||||
// Inject Pages configuration in a given static site generator's configuration file
|
||||
function setPagesConfig({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
|
||||
const isSupportedFileExtension = SUPPORTED_FILE_EXTENSIONS.some(ext => generatorConfigFile.endsWith(ext))
|
||||
if (generatorConfigFile && !isSupportedFileExtension) {
|
||||
const supportedExtensionList = SUPPORTED_FILE_EXTENSIONS.map(ext => JSON.stringify(ext)).join(', ')
|
||||
core.warning(
|
||||
`Unsupported extension in configuration file: ${generatorConfigFile}. Currently supported extensions: ${supportedExtensionList}. We will still attempt to inject the site metadata into the configuration file, but it may not work as expected.`
|
||||
)
|
||||
}
|
||||
|
||||
try {
|
||||
// Parse the configuration file and try to inject the Pages configuration in it
|
||||
const settings = getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, siteUrl })
|
||||
new ConfigParser(settings).injectAll()
|
||||
} catch (error) {
|
||||
const isSupportedFileExtension = SUPPORTED_FILE_EXTENSIONS.some(ext => generatorConfigFile.endsWith(ext))
|
||||
|
||||
// Logging
|
||||
if (!isSupportedFileExtension) {
|
||||
core.warning(
|
||||
`Unsupported configuration file extension. Currently supported extensions: ${SUPPORTED_FILE_EXTENSIONS.map(
|
||||
ext => JSON.stringify(ext)
|
||||
).join(', ')}`,
|
||||
error
|
||||
)
|
||||
} else {
|
||||
core.warning(
|
||||
`We were unable to determine how to inject the site metadata into your config. Generated URLs may be incorrect. The base URL for this site should be ${siteUrl}. Please ensure your framework is configured to generate relative links appropriately.`,
|
||||
error
|
||||
)
|
||||
}
|
||||
core.warning(
|
||||
`We were unable to determine how to inject the site metadata into your config. Generated URLs may be incorrect. The base URL for this site should be ${siteUrl}. Please ensure your framework is configured to generate relative links appropriately. Error: ${error.message}`,
|
||||
convertErrorToAnnotationProperties(error)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user