mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 06:33:17 +08:00
Compare commits
No commits in common. "main" and "v3.9.2" have entirely different histories.
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.
|
||||
- name: GitHub Pages Documentation
|
||||
url: https://docs.github.com/en/pages
|
||||
about: GitHub Pages official documentation here.
|
||||
about: GitHub Pages official documentaion here.
|
||||
- name: GitHub Actions Documentation
|
||||
url: https://docs.github.com/en/actions
|
||||
about: GitHub Actions official documentation here.
|
||||
|
8
.github/workflows/codeql.yml
vendored
8
.github/workflows/codeql.yml
vendored
@ -10,15 +10,15 @@ jobs:
|
||||
CodeQL-Build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: javascript
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
4
.github/workflows/dependency-review.yml
vendored
4
.github/workflows/dependency-review.yml
vendored
@ -12,5 +12,5 @@ jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/dependency-review-action@v4
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/dependency-review-action@v3
|
||||
|
2
.github/workflows/label-commenter.yml
vendored
2
.github/workflows/label-commenter.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Label Commenter
|
||||
uses: peaceiris/actions-label-commenter@v1
|
||||
|
2
.github/workflows/labeler.yml
vendored
2
.github/workflows/labeler.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
||||
permissions: {}
|
||||
steps:
|
||||
# https://github.com/peaceiris/actions-github-app-token
|
||||
- uses: peaceiris/actions-github-app-token@v1.1.6
|
||||
- uses: peaceiris/actions-github-app-token@v1.1.5
|
||||
id: app
|
||||
with:
|
||||
app_id: ${{ secrets.GH_APP_ID }}
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -9,8 +9,8 @@ jobs:
|
||||
release:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
# https://github.com/peaceiris/workflows/blob/main/create-release-npm/action.yml
|
||||
- uses: peaceiris/workflows/create-release-npm@v0.20.1
|
||||
- uses: peaceiris/workflows/create-release-npm@v0.19.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -27,9 +27,9 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: peaceiris/workflows/setup-node@v0.20.1
|
||||
- uses: peaceiris/workflows/setup-node@v0.19.1
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
@ -61,12 +61,12 @@ jobs:
|
||||
- run: npm test
|
||||
|
||||
- name: Upload test coverage as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage-${{ matrix.os }}
|
||||
path: coverage
|
||||
|
||||
- uses: codecov/codecov-action@v4
|
||||
- uses: codecov/codecov-action@v3
|
||||
|
||||
- name: Run ncc
|
||||
run: npm run build
|
||||
|
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
|
||||
timeout-minutes: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Update major tag
|
||||
run: |
|
||||
|
38
CHANGELOG.md
38
CHANGELOG.md
@ -2,44 +2,6 @@
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
200
README.md
200
README.md
@ -14,7 +14,7 @@ GitHub Pages Action
|
||||
|
||||
</div>
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> 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
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -111,7 +111,6 @@ 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)
|
||||
- [⭐️ 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)
|
||||
- [⭐️ Release Strategy](#%EF%B8%8F-release-strategy)
|
||||
- [Examples](#examples)
|
||||
- [⭐️ Static Site Generators with Node.js](#%EF%B8%8F-static-site-generators-with-nodejs)
|
||||
- [⭐️ Gatsby](#%EF%B8%8F-gatsby)
|
||||
@ -157,7 +156,7 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
@ -165,17 +164,17 @@ jobs:
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: '0.110.0'
|
||||
hugo-version: '0.101.0'
|
||||
|
||||
- name: Build
|
||||
run: hugo --minify
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
# If you're changing the branch from main,
|
||||
# also change the `main` in `refs/heads/main`
|
||||
# below accordingly.
|
||||
if: github.ref == 'refs/heads/main'
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -201,7 +200,7 @@ A GitHub Actions runner automatically creates a `GITHUB_TOKEN` secret to use in
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -215,7 +214,7 @@ Read [Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key), create your SSH
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
publish_dir: ./public
|
||||
@ -227,7 +226,7 @@ Read [Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key), create your SSH
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
personal_token: ${{ secrets.PERSONAL_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -240,7 +239,7 @@ The default is `gh-pages`.
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_branch: your-branch # default: gh-pages
|
||||
@ -253,7 +252,7 @@ Only the contents of this dir are pushed to GitHub Pages branch, `gh-pages` by d
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./out # default: public
|
||||
@ -268,7 +267,7 @@ A destination subdirectory on a publishing branch. The default is empty.
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
destination_dir: subdir
|
||||
@ -285,7 +284,7 @@ Values should be split with a comma.
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
exclude_assets: '.github,exclude-file1,exclude-file2'
|
||||
@ -295,7 +294,7 @@ Set `exclude_assets` to empty for including the `.github` directory to deploymen
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} # Recommended for this usage
|
||||
# personal_token: ${{ secrets.PERSONAL_TOKEN }} # An alternative
|
||||
@ -307,7 +306,7 @@ The `exclude_assets` option supports glob patterns.
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
exclude_assets: '.github,exclude-file.txt,exclude-dir/**.txt'
|
||||
@ -322,7 +321,7 @@ For more details about the `CNAME` file, read the official documentation: [Manag
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -340,7 +339,7 @@ Bypassing Jekyll makes the deployment faster and is necessary if you are deployi
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -357,7 +356,7 @@ For example:
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -377,7 +376,7 @@ For example:
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -396,7 +395,7 @@ For example:
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
external_repository: username/external-repository
|
||||
@ -423,7 +422,7 @@ This allows you to make your publish branch with only the latest commit.
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -437,7 +436,7 @@ A commit is always created with the same user.
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -454,7 +453,7 @@ When we create a commit with a message `docs: Update some post`, a deployment co
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -468,7 +467,7 @@ use the `full_commit_message` option instead of the `commit_message` option.
|
||||
|
||||
```yaml
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -497,7 +496,7 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Some build
|
||||
|
||||
@ -508,7 +507,7 @@ jobs:
|
||||
echo "DEPLOY_TAG_NAME=deploy-${TAG_NAME}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -650,49 +649,6 @@ 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">
|
||||
<a href="#table-of-contents">Back to TOC ☝️</a>
|
||||
</div>
|
||||
@ -732,15 +688,15 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '24'
|
||||
node-version: '14'
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@ -751,8 +707,8 @@ jobs:
|
||||
- run: npm run build
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -782,15 +738,15 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '24'
|
||||
node-version: '14'
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@ -803,8 +759,8 @@ jobs:
|
||||
- run: npm run build
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -834,19 +790,19 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '24'
|
||||
node-version: '14'
|
||||
|
||||
- name: Get yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
@ -858,8 +814,8 @@ jobs:
|
||||
- run: yarn export
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./out
|
||||
@ -869,7 +825,7 @@ jobs:
|
||||
|
||||
An example for [Nuxt.js] (Vue.js) project with [create-nuxt-app]
|
||||
|
||||
- cf. [Nuxt - GitHub Pages](https://nuxtjs.org/deployments/github-pages)
|
||||
- cf. [Nuxt - GitHub Pages](https://nuxtjs.org/integrations/deployments/github-pages)
|
||||
|
||||
[Nuxt.js]: https://github.com/nuxt/nuxt.js
|
||||
[create-nuxt-app]: https://github.com/nuxt/create-nuxt-app
|
||||
@ -891,15 +847,15 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '24'
|
||||
node-version: '14'
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@ -911,8 +867,8 @@ jobs:
|
||||
- run: npm run generate
|
||||
|
||||
- name: deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./dist
|
||||
@ -949,19 +905,19 @@ jobs:
|
||||
run:
|
||||
working-directory: website
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '24'
|
||||
node-version: '14'
|
||||
|
||||
- name: Get yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
|
||||
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
|
||||
@ -972,8 +928,8 @@ jobs:
|
||||
- run: yarn build
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./website/build
|
||||
@ -1006,12 +962,12 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.13'
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Upgrade pip
|
||||
run: |
|
||||
@ -1023,7 +979,7 @@ jobs:
|
||||
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
@ -1036,8 +992,8 @@ jobs:
|
||||
- run: mkdocs build
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./site
|
||||
@ -1068,7 +1024,7 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v1
|
||||
@ -1079,8 +1035,8 @@ jobs:
|
||||
- run: mdbook build
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./book
|
||||
@ -1113,7 +1069,7 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Flutter
|
||||
run: |
|
||||
@ -1129,8 +1085,8 @@ jobs:
|
||||
run: flutter build web
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./build/web
|
||||
@ -1159,12 +1115,12 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '24'
|
||||
node-version: '14'
|
||||
|
||||
- name: Setup Elm
|
||||
run: npm install elm --global
|
||||
@ -1180,8 +1136,8 @@ jobs:
|
||||
# provide --output=<output-file> option for `elm make` and remove this step
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
@ -1208,9 +1164,9 @@ jobs:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/cache@v4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/Publish_build
|
||||
@ -1233,8 +1189,8 @@ jobs:
|
||||
- run: publish-cli generate
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./Output
|
||||
|
@ -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.'
|
||||
author: 'peaceiris'
|
||||
runs:
|
||||
using: 'node20'
|
||||
using: 'node16'
|
||||
main: 'lib/index.js'
|
||||
branding:
|
||||
icon: 'upload-cloud'
|
||||
|
7
lib/index.js
Normal file
7
lib/index.js
Normal file
File diff suppressed because one or more lines are too long
3966
package-lock.json
generated
3966
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "actions-github-pages",
|
||||
"version": "4.0.0",
|
||||
"version": "3.9.2",
|
||||
"description": "GitHub Actions for GitHub Pages",
|
||||
"main": "lib/index.js",
|
||||
"engines": {
|
||||
"node": ">=v20.11.0",
|
||||
"npm": ">=10.2.4"
|
||||
"node": ">=v16.19.0",
|
||||
"npm": ">=9.3.0"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "npx husky install",
|
||||
@ -50,20 +50,20 @@
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^5.1.1",
|
||||
"@actions/glob": "^0.5.0",
|
||||
"@actions/glob": "^0.3.0",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@types/shelljs": "^0.8.11",
|
||||
"shelljs": "^0.8.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.2.6",
|
||||
"@types/jest": "^29.2.5",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/node": "~16",
|
||||
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
||||
"@typescript-eslint/parser": "^5.48.2",
|
||||
"@vercel/ncc": "^0.38.0",
|
||||
"@vercel/ncc": "^0.36.0",
|
||||
"eslint": "^8.32.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-plugin-jest": "^27.2.1",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"husky": "^8.0.3",
|
||||
@ -71,7 +71,7 @@
|
||||
"jest-circus": "^29.3.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lint-staged": "^13.1.0",
|
||||
"prettier": "2.8.8",
|
||||
"prettier": "2.8.3",
|
||||
"standard-version": "^9.1.1",
|
||||
"ts-jest": "^29.0.5",
|
||||
"typescript": "^4.9.4"
|
||||
|
@ -5,7 +5,7 @@
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"automerge": false,
|
||||
"automerge": true,
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"automergeStrategy": "squash"
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import * as main from './main';
|
||||
if (error instanceof Error) {
|
||||
core.setFailed(`Action failed with "${error.message}"`);
|
||||
} else {
|
||||
core.setFailed('unexpected error');
|
||||
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
|
||||
} ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=
|
||||
} ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
|
||||
`;
|
||||
fs.writeFileSync(knownHosts, cmdSSHkeyscanOutput + '\n');
|
||||
core.info(`[INFO] wrote ${knownHosts}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user