Repository: peaceiris/actions-gh-pages

Issue #339: Error with deploy_key
Created: 2020-06-05T11:10:07Z
Note that an issue which does not follow the template will be closed silently.
Check list before opening this issue

 I read the latest README

I checked Available Options
I followed Tips and FAQ
I tried Workflow Examples



Describe your question
Trying to push the docs/build/html directory to the gh-pages branch. Since the branch is protected, I guess the github_token is not enough (I got some permission error while pushing) then I'm trying to use the deploy_key. I already added the private key on repository secrets and the public one to the deploy keys.
Unluckily, the action seems not reading the deploy_key variable, getting Action failed with "not found deploy key or tokens".
The action log before error is:

Run peaceiris/actions-gh-pages@v3
with:
publish_dir: ./docs/build/html
publish_branch: gh-pages
allow_empty_commit: false
keep_files: false
force_orphan: false
enable_jekyll: false
disable_nojekyll: false
env:
pythonLocation: /opt/hostedtoolcache/Python/3.6.10/x64
Dump inputs
[INFO] : true
[INFO] PublishBranch: gh-pages
[INFO] PublishDir: ./docs/build/html
[INFO] ExternalRepository:
[INFO] AllowEmptyCommit: false
[INFO] KeepFiles: false
[INFO] ForceOrphan: false
[INFO] UserName:
[INFO] UserEmail:
[INFO] CommitMessage:
[INFO] FullCommitMessage:
[INFO] TagName:
[INFO] TagMessage:
[INFO] EnableJekyll (DisableNoJekyll): false
[INFO]  CNAME:

Link to your contents

Link to your public repository: https://github.com/mathLab/EZyRB
Link to your workflow: https://github.com/mathLab/EZyRB/actions?query=workflow%3A%22Pull+Request+Docs+Check%22

Additional context
Already check the Github status, since I've seen many problem related (#319) with the Github servers, but during my tests the status was always fine.

Duplicate issue #497: Error: Action failed with "The process '/usr/bin/git' failed with exit code 128"
Created: 2020-10-03T00:37:21Z
Check list before opening this issue

 I read the latest README
 I checked Available Options
 I followed Tips and FAQ
 I tried Workflow Examples
 I read the latest GitHub Actions official documentation and learned the basic spec and concepts

Describe your question

First time to use this action to deploy one website.
The website is build with Hugo and I want to use actions to do auto deploy on repo github pages.
The action will fail at Deploy stage.
The error message is:
Run peaceiris/actions-gh-pages@v3
Dump inputs
Setup auth token
Prepare publishing assets
Setup Git config
Create a commit
Push the commit or tag
  /usr/bin/git push origin gh-pages
  remote: Permission to YiGu-Studio/DocsModdingBannerlordCN.git denied to github-actions[bot].
  fatal: unable to access 'https://github.com/YiGu-Studio/DocsModdingBannerlordCN.git/': The requested URL returned error: 403
  Error: Action failed with "The process '/usr/bin/git' failed with exit code 128"

I tried with github_token: ${{ secrets.GITHUB_TOKEN }}
it will throw the error above.
I tried with personal_token: ${{ secrets.PERSONAL_TOKEN }} or deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
it will failed at stage Setup auth token
I even tried with change username and email to my account name. But it still failed.
I post the screen shots of my secrets page in next section.
Link to your contents
Here is the workflow files.
https://github.com/YiGu-Studio/DocsModdingBannerlordCN/blob/e64547ca8ae8ed77e617ecdf816239de051d3273/.github/workflows/hugo_deploy.yml
The raw log of the workflow is here.
https://pipelines.actions.githubusercontent.com/ReJNjsa4JNo8v6DjAI5NX8yN0RMO8ccdvpMUIOf1CGkDAThal5/_apis/pipelines/1/runs/21/signedlogcontent/3?urlExpires=2020-10-03T00%3A36%3A55.9686007Z&urlSigningMethod=HMACV1&urlSignature=7APdckxxT5kF2pDqog6wZtlzjwFxDteZZa8iGBLsRwE%3D
Screenshots


If using Personal Token or Deploy Key

Additional context
I found that if I directly push to branch. it will pass.
But Now I want this to be used for all PR.
Double checked. If I merge this PR, the run will run successfully, but it will failed in PR.

Closing comment (2020-10-04T11:47:08Z): This may be related to #339.
#339 (comment)
#339 (comment)