Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0bdd00b546 | ||
|
|
d772f4e8eb | ||
|
|
bca5701620 |
@@ -70,6 +70,7 @@ Do you want to skip the docker build step? OK, the script mode is available.
|
|||||||
- [⭐️ 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)
|
- [⭐️ Keeping existing files](#%EF%B8%8F-keeping-existing-files)
|
||||||
- [⭐️ Deploy to external repository](#%EF%B8%8F-deploy-to-external-repository)
|
- [⭐️ Deploy to external repository](#%EF%B8%8F-deploy-to-external-repository)
|
||||||
|
- [⭐️ Force orphan](#%EF%B8%8F-force-orphan)
|
||||||
- [⭐️ Script mode](#%EF%B8%8F-script-mode)
|
- [⭐️ Script mode](#%EF%B8%8F-script-mode)
|
||||||
- [Tips and FAQ](#tips-and-faq)
|
- [Tips and FAQ](#tips-and-faq)
|
||||||
- [⭐️ Use the latest and specific release](#%EF%B8%8F-use-the-latest-and-specific-release)
|
- [⭐️ Use the latest and specific release](#%EF%B8%8F-use-the-latest-and-specific-release)
|
||||||
@@ -301,7 +302,7 @@ This allows you to make your publish branch with only the latest commit.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v2.6.0
|
uses: peaceiris/actions-gh-pages@v2
|
||||||
env:
|
env:
|
||||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
PUBLISH_BRANCH: gh-pages
|
PUBLISH_BRANCH: gh-pages
|
||||||
|
|||||||
@@ -20,3 +20,9 @@ inputs:
|
|||||||
description: 'Keep only the latest commit on a GitHub Pages branch'
|
description: 'Keep only the latest commit on a GitHub Pages branch'
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
username:
|
||||||
|
description: 'Set Git user.name'
|
||||||
|
required: false
|
||||||
|
useremail:
|
||||||
|
description: 'Set Git user.email'
|
||||||
|
required: false
|
||||||
|
|||||||
@@ -102,8 +102,16 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# push to publishing branch
|
# push to publishing branch
|
||||||
git config user.name "${GITHUB_ACTOR}"
|
if [[ -n "${INPUT_USERNAME}" ]]; then
|
||||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
git config user.name "${INPUT_USERNAME}"
|
||||||
|
else
|
||||||
|
git config user.name "${GITHUB_ACTOR}"
|
||||||
|
fi
|
||||||
|
if [[ -n "${INPUT_USEREMAIL}" ]]; then
|
||||||
|
git config user.email "${INPUT_USEREMAIL}"
|
||||||
|
else
|
||||||
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
|
fi
|
||||||
git remote rm origin || true
|
git remote rm origin || true
|
||||||
git remote add origin "${remote_repo}"
|
git remote add origin "${remote_repo}"
|
||||||
git add --all
|
git add --all
|
||||||
|
|||||||
Reference in New Issue
Block a user