Skip to content

Commit 45fd035

Browse files
authored
Merge branch 'master' into fix/input-emptycommits
2 parents 83bd255 + 4530dcd commit 45fd035

File tree

10 files changed

+35
-13
lines changed

10 files changed

+35
-13
lines changed

README.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Table of Contents
2121
- [Getting started](#getting-started)
2222
- [(1) Add ssh deploy key](#1-add-ssh-deploy-key)
2323
- [(2) Create `.github/workflows/gh-pages.yml`](#2-create-githubworkflowsgh-pagesyml)
24-
- [:star: Repository type - Project](#star-repository-type---project)
25-
- [:star: Repository type - User and Organization](#star-repository-type---user-and-organization)
24+
- [⭐️ Repository type - Project](#%EF%B8%8F-repository-type---project)
25+
- [⭐️ Repository type - User and Organization](#%EF%B8%8F-repository-type---user-and-organization)
2626
- [Options](#options)
27-
- [:star: Pull action image from Docker Hub](#star-pull-action-image-from-docker-hub)
28-
- [:star: `PERSONAL_TOKEN`](#star-personal_token)
29-
- [:star: `GITHUB_TOKEN`](#star-github_token)
30-
- [:star: Suppressing empty commits](#star-suppressing-empty-commits)
27+
- [⭐️ Pull action image from Docker Hub](#%EF%B8%8F-pull-action-image-from-docker-hub)
28+
- [⭐️ `PERSONAL_TOKEN`](#%EF%B8%8F-personal_token)
29+
- [⭐️ `GITHUB_TOKEN`](#%EF%B8%8F-github_token)
30+
- [⭐️ Suppressing empty commits](#%EF%B8%8F-suppressing-empty-commits)
3131
- [Tips and FAQ](#tips-and-faq)
3232
- [How to add `CNAME`](#how-to-add-cname)
3333
- [Deployment completed but you cannot read](#deployment-completed-but-you-cannot-read)
@@ -62,9 +62,17 @@ Next, Go to **Repository Settings**
6262
- Go to **Deploy Keys** and add your public key with the **Allow write access**
6363
- Go to **Secrets** and add your private key as `ACTIONS_DEPLOY_KEY`
6464

65+
| Add your public key | Success |
66+
|---|---|
67+
| ![](./images/deploy-keys-1.jpg) | ![](./images/deploy-keys-2.jpg) |
68+
69+
| Add your private key | Success |
70+
|---|---|
71+
| ![](./images/secrets-1.jpg) | ![](./images/secrets-2.jpg) |
72+
6573
### (2) Create `.github/workflows/gh-pages.yml`
6674

67-
#### :star: Repository type - Project
75+
#### ⭐️ Repository type - Project
6876

6977
An example workflow for Hugo.
7078

@@ -107,7 +115,15 @@ jobs:
107115
108116
The above example is for [Project Pages sites]. (`<username>/<project_name>` repository)
109117

110-
#### :star: Repository type - User and Organization
118+
| Actions log overview | Build step log |
119+
|---|---|
120+
| ![](./images/log1.jpg) | ![](./images/log2.jpg) |
121+
122+
| Deploy step log | GitHub Pages log |
123+
|---|---|
124+
| ![](./images/log3.jpg) | ![](./images/log4.jpg) |
125+
126+
#### ⭐️ Repository type - User and Organization
111127

112128
For [User and Organization Pages sites] (`<username>/<username>.github.io` repository),
113129
we have to set `master` branch to `PUBLISH_BRANCH`.
@@ -124,9 +140,11 @@ PUBLISH_BRANCH: master # deploying branch
124140
[Project Pages sites]: https://help.github.com/en/articles/user-organization-and-project-pages#project-pages-sites
125141
[User and Organization Pages sites]: https://help.github.com/en/articles/user-organization-and-project-pages#user-and-organization-pages-sites
126142

143+
![Change default branch](./images/default-branch.jpg)
144+
127145
### Options
128146

129-
#### :star: Pull action image from Docker Hub
147+
#### ⭐️ Pull action image from Docker Hub
130148

131149
You can pull a public docker image from Docker Hub.
132150
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
138156

139157
- [peaceiris/gh-pages - Docker Hub](https://hub.docker.com/r/peaceiris/gh-pages)
140158

141-
#### :star: `PERSONAL_TOKEN`
159+
#### ⭐️ `PERSONAL_TOKEN`
142160

143161
[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`.
144162

@@ -147,16 +165,20 @@ By pulling docker images, you can reduce the overall execution time of your work
147165
+ PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
148166
```
149167

150-
#### :star: `GITHUB_TOKEN`
168+
#### ⭐️ `GITHUB_TOKEN`
169+
170+
> **NOTES**: Do not use `GITHUB_TOKEN`.
171+
>
172+
> This action supports `GITHUB_TOKEN` but it has some problems to deploy to GitHub Pages. See [Issue #9]
151173

152-
> **NOTES**: This action supports `GITHUB_TOKEN` but it has some problems to deploy to GitHub Pages. See #9
174+
[Issue #9]: https://github.com/peaceiris/actions-gh-pages/issues/9
153175

154176
```diff
155177
- ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
156178
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157179
```
158180

159-
#### :star: Suppressing empty commits
181+
#### ⭐️ Suppressing empty commits
160182

161183
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]
162184

images/default-branch.jpg

42.8 KB
Loading

images/deploy-keys-1.jpg

173 KB
Loading

images/deploy-keys-2.jpg

58.4 KB
Loading

images/log1.jpg

51 KB
Loading

images/log2.jpg

63.8 KB
Loading

images/log3.jpg

151 KB
Loading

images/log4.jpg

60.4 KB
Loading

images/secrets-1.jpg

154 KB
Loading

images/secrets-2.jpg

52.6 KB
Loading

0 commit comments

Comments
 (0)