mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-19 00:43:14 +08:00
Compare commits
3 Commits
main
...
v2.4.0-rc0
Author | SHA1 | Date | |
---|---|---|---|
|
51a5b047a7 | ||
|
649380ea44 | ||
|
493f73c406 |
@ -28,6 +28,7 @@ Table of Contents
|
|||||||
- [⭐️ `PERSONAL_TOKEN`](#%EF%B8%8F-personal_token)
|
- [⭐️ `PERSONAL_TOKEN`](#%EF%B8%8F-personal_token)
|
||||||
- [⭐️ `GITHUB_TOKEN`](#%EF%B8%8F-github_token)
|
- [⭐️ `GITHUB_TOKEN`](#%EF%B8%8F-github_token)
|
||||||
- [⭐️ Suppressing empty commits](#%EF%B8%8F-suppressing-empty-commits)
|
- [⭐️ Suppressing empty commits](#%EF%B8%8F-suppressing-empty-commits)
|
||||||
|
- [⭐️ Keeping existing files](#%EF%B8%8F-keeping-existing-files)
|
||||||
- [Tips and FAQ](#tips-and-faq)
|
- [Tips and FAQ](#tips-and-faq)
|
||||||
- [How to add `CNAME`](#how-to-add-cname)
|
- [How to add `CNAME`](#how-to-add-cname)
|
||||||
- [Deployment completed but you cannot read](#deployment-completed-but-you-cannot-read)
|
- [Deployment completed but you cannot read](#deployment-completed-but-you-cannot-read)
|
||||||
@ -189,7 +190,7 @@ By default, a commit will always be generated and pushed to the `PUBLISH_BRANCH`
|
|||||||
For example:
|
For example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v2.3.2
|
uses: peaceiris/actions-gh-pages@v2.3.2
|
||||||
env:
|
env:
|
||||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
@ -206,7 +207,7 @@ By default, existing files in the publish branch are removed before adding the o
|
|||||||
For example:
|
For example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v2.3.2
|
uses: peaceiris/actions-gh-pages@v2.3.2
|
||||||
env:
|
env:
|
||||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
@ -217,6 +218,7 @@ For example:
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Tips and FAQ
|
## Tips and FAQ
|
||||||
|
|
||||||
### How to add `CNAME`
|
### How to add `CNAME`
|
||||||
|
@ -62,8 +62,9 @@ local_dir="${HOME}/$(tr -cd 'a-f0-9' < /dev/urandom | head -c 32)"
|
|||||||
if git clone --depth=1 --single-branch --branch "${remote_branch}" "${remote_repo}" "${local_dir}"; then
|
if git clone --depth=1 --single-branch --branch "${remote_branch}" "${remote_repo}" "${local_dir}"; then
|
||||||
cd "${local_dir}"
|
cd "${local_dir}"
|
||||||
|
|
||||||
print_info "Keeping existing files: ${INPUT_KEEPFILES}"
|
if [[ ${INPUT_KEEPFILES} == "true" ]]; then
|
||||||
if [[ ${INPUT_KEEPFILES} != "true" ]]; then
|
print_info "Keeping existing files: ${INPUT_KEEPFILES}"
|
||||||
|
else
|
||||||
git rm -r --ignore-unmatch '*'
|
git rm -r --ignore-unmatch '*'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user