From c940278a4c780afbd658b4a3f0f7834039913401 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Wed, 5 Feb 2020 15:44:30 +0900 Subject: [PATCH] docs: update overview --- README.md | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 10ef24265..98d020ff8 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,20 @@ This deploy action can be combined simply and freely with [Static Site Generator The next example step will deploy `./public` directory to the remote `gh-pages` branch. + +```yaml +- name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} + # github_token: ${{ secrets.GITHUB_TOKEN }} + # personal_token: ${{ secrets.PERSONAL_TOKEN }} + publish_dir: ./public +``` + +
+👉 Old v2 YAML here + ```yaml - name: Deploy uses: peaceiris/actions-gh-pages@v2 @@ -33,30 +47,19 @@ The next example step will deploy `./public` directory to the remote `gh-pages` PUBLISH_DIR: ./public ``` +
+ + Three tokens are supported. | Token | Private repo | Public repo | Protocol | Setup | |---|:---:|:---:|---|---| -| `GITHUB_TOKEN` | ✅️ | (1) | HTTPS | Unnecessary | -| `PERSONAL_TOKEN` | ✅️ | ✅️ | HTTPS | Necessary | -| `ACTIONS_DEPLOY_KEY` | ✅️ | ✅️ | SSH | Necessary | +| `github_token` | ✅️ | (1) | HTTPS | Unnecessary | +| `personal_token` | ✅️ | ✅️ | HTTPS | Necessary | +| `deploy_key` | ✅️ | ✅️ | SSH | Necessary | 1. Currently, GitHub Actions does not support to trigger a GitHub Pages build event using GITHUB_TOKEN on a public repository. -Do you want to skip the docker build step? OK, the script mode is available. - -```yaml -- name: Deploy - env: - ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./public - SCRIPT_MODE: true - run: | - wget https://raw.githubusercontent.com/peaceiris/actions-gh-pages/v2/entrypoint.sh - bash ./entrypoint.sh -``` - ## Table of Contents