docs: Add log images (#30)

* docs: Add log images
* docs: replace star emoji
This commit is contained in:
Shohei Ueda 2019-09-22 13:06:23 +09:00 committed by GitHub
parent 0713c6cb9c
commit 74f032c7e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 30 additions and 12 deletions

View File

@ -21,13 +21,13 @@ Table of Contents
- [Getting started](#getting-started)
- [(1) Add ssh deploy key](#1-add-ssh-deploy-key)
- [(2) Create `.github/workflows/gh-pages.yml`](#2-create-githubworkflowsgh-pagesyml)
- [:star: Repository type - Project](#star-repository-type---project)
- [:star: Repository type - User and Organization](#star-repository-type---user-and-organization)
- [⭐️ Repository type - Project](#%EF%B8%8F-repository-type---project)
- [⭐️ Repository type - User and Organization](#%EF%B8%8F-repository-type---user-and-organization)
- [Options](#options)
- [:star: Pull action image from Docker Hub](#star-pull-action-image-from-docker-hub)
- [:star: `PERSONAL_TOKEN`](#star-personal_token)
- [:star: `GITHUB_TOKEN`](#star-github_token)
- [:star: Suppressing empty commits](#star-suppressing-empty-commits)
- [⭐️ Pull action image from Docker Hub](#%EF%B8%8F-pull-action-image-from-docker-hub)
- [⭐️ `PERSONAL_TOKEN`](#%EF%B8%8F-personal_token)
- [⭐️ `GITHUB_TOKEN`](#%EF%B8%8F-github_token)
- [⭐️ Suppressing empty commits](#%EF%B8%8F-suppressing-empty-commits)
- [Tips and FAQ](#tips-and-faq)
- [How to add `CNAME`](#how-to-add-cname)
- [Deployment completed but you cannot read](#deployment-completed-but-you-cannot-read)
@ -62,9 +62,17 @@ Next, Go to **Repository Settings**
- Go to **Deploy Keys** and add your public key with the **Allow write access**
- Go to **Secrets** and add your private key as `ACTIONS_DEPLOY_KEY`
| Add your public key | Success |
|---|---|
| ![](./images/deploy-keys-1.jpg) | ![](./images/deploy-keys-2.jpg) |
| Add your private key | Success |
|---|---|
| ![](./images/secrets-1.jpg) | ![](./images/secrets-2.jpg) |
### (2) Create `.github/workflows/gh-pages.yml`
#### :star: Repository type - Project
#### ⭐️ Repository type - Project
An example workflow for Hugo.
@ -107,7 +115,15 @@ jobs:
The above example is for [Project Pages sites]. (`<username>/<project_name>` repository)
#### :star: Repository type - User and Organization
| Actions log overview | Build step log |
|---|---|
| ![](./images/log1.jpg) | ![](./images/log2.jpg) |
| Deploy step log | GitHub Pages log |
|---|---|
| ![](./images/log3.jpg) | ![](./images/log4.jpg) |
#### ⭐️ Repository type - User and Organization
For [User and Organization Pages sites] (`<username>/<username>.github.io` repository),
we have to set `master` branch to `PUBLISH_BRANCH`.
@ -124,9 +140,11 @@ PUBLISH_BRANCH: master # deploying branch
[Project Pages sites]: https://help.github.com/en/articles/user-organization-and-project-pages#project-pages-sites
[User and Organization Pages sites]: https://help.github.com/en/articles/user-organization-and-project-pages#user-and-organization-pages-sites
![Change default branch](./images/default-branch.jpg)
### Options
#### :star: Pull action image from Docker Hub
#### ⭐️ Pull action image from Docker Hub
You can pull a public docker image from Docker Hub.
By pulling docker images, you can reduce the overall execution time of your workflow. In addition, `latest` tag is provided.
@ -138,7 +156,7 @@ By pulling docker images, you can reduce the overall execution time of your work
- [peaceiris/gh-pages - Docker Hub](https://hub.docker.com/r/peaceiris/gh-pages)
#### :star: `PERSONAL_TOKEN`
#### ⭐️ `PERSONAL_TOKEN`
[Generate a personal access token (`repo`)](https://github.com/settings/tokens) and add it to Secrets as `PERSONAL_TOKEN`, it works as well as `ACTIONS_DEPLOY_KEY`.
@ -147,7 +165,7 @@ By pulling docker images, you can reduce the overall execution time of your work
+ PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
```
#### :star: `GITHUB_TOKEN`
#### ⭐️ `GITHUB_TOKEN`
> **NOTES**: This action supports `GITHUB_TOKEN` but it has some problems to deploy to GitHub Pages. See #9
@ -156,7 +174,7 @@ By pulling docker images, you can reduce the overall execution time of your work
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
#### :star: Suppressing empty commits
#### ⭐️ Suppressing empty commits
By default, a commit will always be generated and pushed to the `PUBLISH_BRANCH`, even if nothing changed. If you want to suppress this behavior, set the optional parameter `emptyCommits` to `false`. cf. [Issue #21]

BIN
images/default-branch.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
images/deploy-keys-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
images/deploy-keys-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
images/log1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
images/log2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
images/log3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
images/log4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
images/secrets-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

BIN
images/secrets-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB