docs: Add notes about GitHub_TOKEN (#145)

* docs: Add notes about GitHub_TOKEN
* docs: Update images
This commit is contained in:
Shohei Ueda 2020-03-07 18:32:36 +09:00 committed by GitHub
parent fab0628782
commit 68520436f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 7 deletions

View File

@ -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 |
|---|---| |---|---|
| ![](./images/log1.jpg) | ![](./images/log2.jpg) | | ![](./images/log_overview.jpg) | ![](./images/log_success.jpg) |
| Deploy step log | GitHub Pages log |
|---|---|
| ![](./images/log3.jpg) | ![](./images/log4.jpg) |
### ⭐️ 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
@ -431,6 +430,18 @@ Next, Go to **Repository Settings**
|---|---| |---|---|
| ![](./images/secrets-1.jpg) | ![](./images/secrets-2.jpg) | | ![](./images/secrets-1.jpg) | ![](./images/secrets-2.jpg) |
### ⭐️ 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 |
|---|---|
| ![](./images/log_first_deployment_failed_with_github_token.jpg) | ![](./images/settings_inactive.jpg) |
| Select branch | Deploying again and succeed |
|---|---|
| ![](./images/settings_select.jpg) | ![](./images/log_success.jpg) |
### ⭐️ 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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
images/log_overview.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
images/log_success.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
images/settings_select.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB