Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
221953c929 | ||
|
|
dd094624d6 | ||
|
|
a7bc3c37fd | ||
|
|
c279167199 | ||
|
|
a4c25ca778 | ||
|
|
9571d29e0d | ||
|
|
f3b165fbe1 | ||
|
|
eb73e9cb9d | ||
|
|
860ed1944f | ||
|
|
945c44d50a | ||
|
|
d8ed36f54a | ||
|
|
d2d8e21d7e | ||
|
|
80c8fe5fb3 | ||
|
|
81884efe7c | ||
|
|
618792b2f0 | ||
|
|
86214f3d79 | ||
|
|
68520436f8 | ||
|
|
fab0628782 |
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: Bug report
|
name: Bug report
|
||||||
about: Create a report to help us improve
|
about: Create a report to help us improve
|
||||||
title: 'Bug: This is a sample issue title'
|
title: 'sample_title'
|
||||||
labels: bug
|
labels: bug
|
||||||
assignees: peaceiris
|
assignees: peaceiris
|
||||||
|
|
||||||
|
|||||||
7
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -3,6 +3,9 @@ contact_links:
|
|||||||
- name: GitHub Actions Community Forum
|
- name: GitHub Actions Community Forum
|
||||||
url: https://github.community/t5/GitHub-Actions/bd-p/actions
|
url: https://github.community/t5/GitHub-Actions/bd-p/actions
|
||||||
about: Please ask questions about GitHub Actions here.
|
about: Please ask questions about GitHub Actions here.
|
||||||
- name: GitHub Pages help
|
- name: GitHub Pages Documentation
|
||||||
url: https://help.github.com/en/github/working-with-github-pages
|
url: https://help.github.com/en/github/working-with-github-pages
|
||||||
about: GitHub Pages documentaion here.
|
about: GitHub Pages official documentaion here.
|
||||||
|
- name: GitHub Actions Documentation
|
||||||
|
url: https://help.github.com/en/actions
|
||||||
|
about: GitHub Actions official documentaion here.
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/proposal.md
vendored
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: Proposal
|
name: Proposal
|
||||||
about: Suggest an idea for this project
|
about: Suggest an idea for this project
|
||||||
title: 'proposal: This is a sample title'
|
title: 'sample_title'
|
||||||
labels: proposal
|
labels: proposal
|
||||||
assignees: peaceiris
|
assignees: peaceiris
|
||||||
|
|
||||||
|
|||||||
31
.github/ISSUE_TEMPLATE/user_support.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
name: User support
|
||||||
|
about: Questions for this action
|
||||||
|
title: 'sample_title'
|
||||||
|
labels: support
|
||||||
|
assignees: peaceiris
|
||||||
|
---
|
||||||
|
|
||||||
|
**Check list before opening this issue**
|
||||||
|
|
||||||
|
- [ ] I read the latest README
|
||||||
|
- I checked [Available Options](https://github.com/peaceiris/actions-gh-pages#options)
|
||||||
|
- I followed [Tips and FAQ](https://github.com/peaceiris/actions-gh-pages#tips-and-faq)
|
||||||
|
- I tried [Workflow Examples](https://github.com/peaceiris/actions-gh-pages#examples)
|
||||||
|
|
||||||
|
**Describe your question**
|
||||||
|
|
||||||
|
A clear and concise description of what the question is.
|
||||||
|
|
||||||
|
**Link to your contents**
|
||||||
|
|
||||||
|
- Link to your public repository here
|
||||||
|
- Link to your workflow here
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
|
||||||
|
If applicable, add screenshots to help explain your question.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
|
||||||
|
Add any other context about the problem here.
|
||||||
7
.github/workflows/release.yml
vendored
@@ -3,13 +3,12 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v3.*.*'
|
- 'v3.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
@@ -19,8 +18,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Install github/hub
|
- name: Install github/hub
|
||||||
run: |
|
run: |
|
||||||
export HUB_VERSION="2.14.1"
|
export HUB_VERSION="2.14.2"
|
||||||
curl -fsSL https://github.com/github/hub/raw/40e421edd2c63d57bb8daa4bb9bbdfa21e8becf9/script/get | bash -s "${HUB_VERSION}"
|
curl -fsSL https://github.com/github/hub/raw/8d91904208171b013f9a9d1175f4ab39068db047/script/get | bash -s "${HUB_VERSION}"
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
env:
|
env:
|
||||||
|
|||||||
4
.github/workflows/test-action.yml
vendored
@@ -87,8 +87,8 @@ jobs:
|
|||||||
allow_empty_commit: true
|
allow_empty_commit: true
|
||||||
# keep_files: true
|
# keep_files: true
|
||||||
# force_orphan: true
|
# force_orphan: true
|
||||||
# user_name: iris
|
user_name: 'github-actions[bot]'
|
||||||
# user_email: email@peaceiris.com
|
user_email: 'github-actions[bot]@users.noreply.github.com'
|
||||||
# commit_message: ${{ github.event.head_commit.message }}
|
# commit_message: ${{ github.event.head_commit.message }}
|
||||||
# tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
|
# tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
|
||||||
# tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
|
# tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
|
||||||
|
|||||||
32
CHANGELOG.md
@@ -2,6 +2,38 @@
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
## [3.5.1](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.0...v3.5.1) (2020-03-09)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* [ImgBot] Optimize images (#147) ([d8ed36f](https://github.com/peaceiris/actions-gh-pages/commit/d8ed36f54aee9f59e2e00fa7aceda885cd6d3eb8)), closes [#147](https://github.com/peaceiris/actions-gh-pages/issues/147)
|
||||||
|
* Add missing descriptions ([a7bc3c3](https://github.com/peaceiris/actions-gh-pages/commit/a7bc3c37fdc9c640720165cb06fbffe20febe7a3))
|
||||||
|
* Add user support issue template (#146) ([86214f3](https://github.com/peaceiris/actions-gh-pages/commit/86214f3d7909e3e81e38f0a73a897e00fc1198e4)), closes [#146](https://github.com/peaceiris/actions-gh-pages/issues/146) [#58](https://github.com/peaceiris/actions-gh-pages/issues/58)
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* Add GitHub Actions bot as committer ([80c8fe5](https://github.com/peaceiris/actions-gh-pages/commit/80c8fe5fb32cd1e1b866e2d0d0d34cb1ba492586))
|
||||||
|
* fix user_name ([f3b165f](https://github.com/peaceiris/actions-gh-pages/commit/f3b165fbe1a9ec4c9bd8b435ee13fc7cb10ef42a))
|
||||||
|
* fix user_name ([945c44d](https://github.com/peaceiris/actions-gh-pages/commit/945c44d50a26eb6b24dbc0157dd836a39f9d5edb))
|
||||||
|
* update script link [skip ci] ([c279167](https://github.com/peaceiris/actions-gh-pages/commit/c2791671998aa8f7858322a1bb74a1e74fb58923))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @types/jest from 25.1.3 to 25.1.4 (#148) ([a4c25ca](https://github.com/peaceiris/actions-gh-pages/commit/a4c25ca7788f09428015b84ffd661ec30c7f2734)), closes [#148](https://github.com/peaceiris/actions-gh-pages/issues/148)
|
||||||
|
* bump hub 2.14.1 to 2.14.2 ([618792b](https://github.com/peaceiris/actions-gh-pages/commit/618792b2f09d6b33bc394ffa2ffaec5ce48fc15d))
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* Add bot committer image ([d2d8e21](https://github.com/peaceiris/actions-gh-pages/commit/d2d8e21d7ee28e4ab68e977f54ce0de33f9ae3ba))
|
||||||
|
* Add GitHub Actions bot committer ([81884ef](https://github.com/peaceiris/actions-gh-pages/commit/81884efe7cbee81f6d73a96037ac547b3eda1b78))
|
||||||
|
* Add notes about GitHub_TOKEN (#145) ([6852043](https://github.com/peaceiris/actions-gh-pages/commit/68520436f89fb253238c54f1ad6c5c3681c3e85b)), closes [#145](https://github.com/peaceiris/actions-gh-pages/issues/145)
|
||||||
|
* fix user_name ([9571d29](https://github.com/peaceiris/actions-gh-pages/commit/9571d29e0df7e4a5bd5700f5531848e9158d7a2c))
|
||||||
|
* fix user_name ([eb73e9c](https://github.com/peaceiris/actions-gh-pages/commit/eb73e9cb9d8ed1656b67a83c37e7dc1bc9c0dc00))
|
||||||
|
* fix user_name ([860ed19](https://github.com/peaceiris/actions-gh-pages/commit/860ed1944f8968c2df2e052bd419a015ec10be38))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [3.5.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.4.1...v3.5.0) (2020-03-06)
|
# [3.5.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.4.1...v3.5.0) (2020-03-06)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
31
README.md
@@ -42,6 +42,8 @@ Three tokens are supported.
|
|||||||
| `deploy_key` | ✅️ | ✅️ | SSH | Necessary |
|
| `deploy_key` | ✅️ | ✅️ | SSH | Necessary |
|
||||||
| `personal_token` | ✅️ | ✅️ | HTTPS | Necessary |
|
| `personal_token` | ✅️ | ✅️ | HTTPS | Necessary |
|
||||||
|
|
||||||
|
Notes: Actually, the `GitHub_TOKEN` works for deploying to GitHub Pages but it has still some limitations. For the first deployment, we need to select the `gh-pages` branch or `master` branch on the repository settings tab. See [First Deployment with `GITHUB_TOKEN`](#%EF%B8%8F-first-deployment-with-github_token)
|
||||||
|
|
||||||
### Supported Platforms
|
### Supported Platforms
|
||||||
|
|
||||||
| runs-on | `github_token` | `deploy_key` | `personal_token` |
|
| runs-on | `github_token` | `deploy_key` | `personal_token` |
|
||||||
@@ -77,6 +79,7 @@ Three tokens are supported.
|
|||||||
- [⭐️ Create Git tag](#%EF%B8%8F-create-git-tag)
|
- [⭐️ Create Git tag](#%EF%B8%8F-create-git-tag)
|
||||||
- [Tips and FAQ](#tips-and-faq)
|
- [Tips and FAQ](#tips-and-faq)
|
||||||
- [⭐️ Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key)
|
- [⭐️ Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key)
|
||||||
|
- [⭐️ 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)
|
||||||
- [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)
|
||||||
@@ -140,13 +143,9 @@ jobs:
|
|||||||
|
|
||||||
The above example is for [Project Pages sites]. (`<username>/<project_name>` repository)
|
The above example is for [Project Pages sites]. (`<username>/<project_name>` repository)
|
||||||
|
|
||||||
| Actions log overview | Build step log |
|
| Actions log overview | GitHub Pages log |
|
||||||
|---|---|
|
|---|---|
|
||||||
|  |  |
|
|  |  |
|
||||||
|
|
||||||
| Deploy step log | GitHub Pages log |
|
|
||||||
|---|---|
|
|
||||||
|  |  |
|
|
||||||
|
|
||||||
### ⭐️ Repository type - User and Organization
|
### ⭐️ Repository type - User and Organization
|
||||||
|
|
||||||
@@ -193,7 +192,7 @@ jobs:
|
|||||||
|
|
||||||
### ⭐️ `deploy_key`
|
### ⭐️ `deploy_key`
|
||||||
|
|
||||||
Read [⭐️ Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key), create your SSH deploy key, and set the `deploy_key` option like the following.
|
Read [Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key), create your SSH deploy key, and set the `deploy_key` option like the following.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
@@ -328,10 +327,12 @@ A commit is always created with the same user.
|
|||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
user_name: iris
|
user_name: 'github-actions[bot]'
|
||||||
user_email: iris@peaceiris.com
|
user_email: 'github-actions[bot]@users.noreply.github.com'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<img width="400px" alt="Add GitHub Actions bot as a committer" src="./images/committer_github_actions_bot.jpg">
|
||||||
|
|
||||||
### ⭐️ Set custom commit message
|
### ⭐️ Set custom commit message
|
||||||
|
|
||||||
Set custom commit message.
|
Set custom commit message.
|
||||||
@@ -431,6 +432,18 @@ Next, Go to **Repository Settings**
|
|||||||
|---|---|
|
|---|---|
|
||||||
|  |  |
|
|  |  |
|
||||||
|
|
||||||
|
### ⭐️ First Deployment with `GITHUB_TOKEN`
|
||||||
|
|
||||||
|
The `GITHUB_TOKEN` has limitations for the first deployment so we have to select the GitHub Pages branch on the repository settings tab.
|
||||||
|
|
||||||
|
| First deployment failed | Go to the settings tab |
|
||||||
|
|---|---|
|
||||||
|
|  |  |
|
||||||
|
|
||||||
|
| Select branch | Deploying again and succeed |
|
||||||
|
|---|---|
|
||||||
|
|  |  |
|
||||||
|
|
||||||
### ⭐️ Use the latest and specific release
|
### ⭐️ Use the latest and specific release
|
||||||
|
|
||||||
We recommend you to use the latest and specific release of this action for stable CI/CD.
|
We recommend you to use the latest and specific release of this action for stable CI/CD.
|
||||||
|
|||||||
12
action.yml
@@ -9,24 +9,24 @@ branding:
|
|||||||
color: 'blue'
|
color: 'blue'
|
||||||
inputs:
|
inputs:
|
||||||
deploy_key:
|
deploy_key:
|
||||||
description: ''
|
description: 'Set a SSH private key from repository secret value for pushing to the remote branch.'
|
||||||
required: false
|
required: false
|
||||||
github_token:
|
github_token:
|
||||||
description: ''
|
description: 'Set a generated GITHUB_TOKEN for pushing to the remote branch.'
|
||||||
required: false
|
required: false
|
||||||
personal_token:
|
personal_token:
|
||||||
description: ''
|
description: 'Set a personal access token for pushing to the remote branch.'
|
||||||
required: false
|
required: false
|
||||||
publish_branch:
|
publish_branch:
|
||||||
description: ''
|
description: 'Set a target branch for deployment.'
|
||||||
required: false
|
required: false
|
||||||
default: 'gh-pages'
|
default: 'gh-pages'
|
||||||
publish_dir:
|
publish_dir:
|
||||||
description: ''
|
description: 'Set an input directory for deployment.'
|
||||||
required: false
|
required: false
|
||||||
default: 'public'
|
default: 'public'
|
||||||
external_repository:
|
external_repository:
|
||||||
description: ''
|
description: 'Set an external repository (owner/repo).'
|
||||||
required: false
|
required: false
|
||||||
allow_empty_commit:
|
allow_empty_commit:
|
||||||
description: 'If empty commits should be made to the publication branch'
|
description: 'If empty commits should be made to the publication branch'
|
||||||
|
|||||||
BIN
images/committer_github_actions_bot.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
images/log2.jpg
|
Before Width: | Height: | Size: 64 KiB |
BIN
images/log3.jpg
|
Before Width: | Height: | Size: 151 KiB |
BIN
images/log_first_deployment_failed_with_github_token.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
images/log_overview.jpg
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
images/log_success.jpg
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
images/settings_inactive.jpg
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
images/settings_select.jpg
Normal file
|
After Width: | Height: | Size: 79 KiB |
8
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "actions-github-pages",
|
"name": "actions-github-pages",
|
||||||
"version": "3.5.0",
|
"version": "3.5.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -740,9 +740,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/jest": {
|
"@types/jest": {
|
||||||
"version": "25.1.3",
|
"version": "25.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.1.4.tgz",
|
||||||
"integrity": "sha512-jqargqzyJWgWAJCXX96LBGR/Ei7wQcZBvRv0PLEu9ZByMfcs23keUJrKv9FMR6YZf9YCbfqDqgmY+JUBsnqhrg==",
|
"integrity": "sha512-QDDY2uNAhCV7TMCITrxz+MRk1EizcsevzfeS6LykIlq2V1E5oO4wXG8V2ZEd9w7Snxeeagk46YbMgZ8ESHx3sw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"jest-diff": "^25.1.0",
|
"jest-diff": "^25.1.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "actions-github-pages",
|
"name": "actions-github-pages",
|
||||||
"version": "3.5.0",
|
"version": "3.5.1",
|
||||||
"description": "GitHub Actions for GitHub Pages",
|
"description": "GitHub Actions for GitHub Pages",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
"@actions/io": "^1.0.2"
|
"@actions/io": "^1.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^25.1.3",
|
"@types/jest": "^25.1.4",
|
||||||
"@types/js-yaml": "^3.12.2",
|
"@types/js-yaml": "^3.12.2",
|
||||||
"@types/node": "~12",
|
"@types/node": "~12",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.22.0",
|
"@typescript-eslint/eslint-plugin": "^2.22.0",
|
||||||
|
|||||||