mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 14:43:21 +08:00
Release v2.2.0 (#19)
* try to fix: remote repo URL for GITHUB_TOKEN cf. https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#http-based-git-access-by-an-installation * add: PERSONAL_TOKEN * update: readme about PERSONAL_TOKEN
This commit is contained in:
parent
8fd3a55a6f
commit
b263205b1b
@ -91,6 +91,15 @@ By pulling docker images, you can reduce the overall execution time of your work
|
|||||||
|
|
||||||
- [peaceiris/gha-hugo - Docker Hub](https://hub.docker.com/r/peaceiris/gha-hugo)
|
- [peaceiris/gha-hugo - Docker Hub](https://hub.docker.com/r/peaceiris/gha-hugo)
|
||||||
|
|
||||||
|
#### `PERSONAL_TOKEN`
|
||||||
|
|
||||||
|
[Create 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`.
|
||||||
|
|
||||||
|
```diff
|
||||||
|
- ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
|
+ PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
#### `GITHUB_TOKEN`
|
#### `GITHUB_TOKEN`
|
||||||
|
|
||||||
> **NOTES**: This action supports `GITHUB_TOKEN` but it has some problems to deploy to GitHub Pages. See #9
|
> **NOTES**: This action supports `GITHUB_TOKEN` but it has some problems to deploy to GitHub Pages. See #9
|
||||||
|
@ -23,14 +23,20 @@ if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then
|
|||||||
|
|
||||||
remote_repo="git@github.com:${GITHUB_REPOSITORY}.git"
|
remote_repo="git@github.com:${GITHUB_REPOSITORY}.git"
|
||||||
|
|
||||||
|
elif [ -n "${PERSONAL_TOKEN}" ]; then
|
||||||
|
|
||||||
|
print_info "setup with PERSONAL_TOKEN"
|
||||||
|
|
||||||
|
remote_repo="https://x-access-token:${PERSONAL_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||||
|
|
||||||
elif [ -n "${GITHUB_TOKEN}" ]; then
|
elif [ -n "${GITHUB_TOKEN}" ]; then
|
||||||
|
|
||||||
print_info "setup with GITHUB_TOKEN"
|
print_info "setup with GITHUB_TOKEN"
|
||||||
|
|
||||||
remote_repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||||
|
|
||||||
else
|
else
|
||||||
print_error "not found ACTIONS_DEPLOY_KEY or GITHUB_TOKEN"
|
print_error "not found ACTIONS_DEPLOY_KEY, PERSONAL_TOKEN, or GITHUB_TOKEN"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user