mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 22:56:54 +08:00
docs: update overview
This commit is contained in:
parent
9cec798451
commit
c940278a4c
37
README.md
37
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.
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>👉 Old v2 YAML here</summary>
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v2
|
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
|
PUBLISH_DIR: ./public
|
||||||
```
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
Three tokens are supported.
|
Three tokens are supported.
|
||||||
|
|
||||||
| Token | Private repo | Public repo | Protocol | Setup |
|
| Token | Private repo | Public repo | Protocol | Setup |
|
||||||
|---|:---:|:---:|---|---|
|
|---|:---:|:---:|---|---|
|
||||||
| `GITHUB_TOKEN` | ✅️ | (1) | HTTPS | Unnecessary |
|
| `github_token` | ✅️ | (1) | HTTPS | Unnecessary |
|
||||||
| `PERSONAL_TOKEN` | ✅️ | ✅️ | HTTPS | Necessary |
|
| `personal_token` | ✅️ | ✅️ | HTTPS | Necessary |
|
||||||
| `ACTIONS_DEPLOY_KEY` | ✅️ | ✅️ | SSH | 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.
|
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
|
## Table of Contents
|
||||||
|
Loading…
x
Reference in New Issue
Block a user