diff --git a/README.md b/README.md index e43e4ea..ce6a0fc 100644 --- a/README.md +++ b/README.md @@ -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]. (`/` 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] (`/.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] diff --git a/images/default-branch.jpg b/images/default-branch.jpg new file mode 100644 index 0000000..c672d87 Binary files /dev/null and b/images/default-branch.jpg differ diff --git a/images/deploy-keys-1.jpg b/images/deploy-keys-1.jpg new file mode 100644 index 0000000..2f15e27 Binary files /dev/null and b/images/deploy-keys-1.jpg differ diff --git a/images/deploy-keys-2.jpg b/images/deploy-keys-2.jpg new file mode 100644 index 0000000..addf840 Binary files /dev/null and b/images/deploy-keys-2.jpg differ diff --git a/images/log1.jpg b/images/log1.jpg new file mode 100644 index 0000000..eef3e38 Binary files /dev/null and b/images/log1.jpg differ diff --git a/images/log2.jpg b/images/log2.jpg new file mode 100644 index 0000000..2b53a6e Binary files /dev/null and b/images/log2.jpg differ diff --git a/images/log3.jpg b/images/log3.jpg new file mode 100644 index 0000000..fd465bc Binary files /dev/null and b/images/log3.jpg differ diff --git a/images/log4.jpg b/images/log4.jpg new file mode 100644 index 0000000..7fa2be3 Binary files /dev/null and b/images/log4.jpg differ diff --git a/images/secrets-1.jpg b/images/secrets-1.jpg new file mode 100644 index 0000000..ac87e06 Binary files /dev/null and b/images/secrets-1.jpg differ diff --git a/images/secrets-2.jpg b/images/secrets-2.jpg new file mode 100644 index 0000000..bcb07d4 Binary files /dev/null and b/images/secrets-2.jpg differ