support: self-hosted runner publishes directory with weird prefix
See original GitHub issueI recently switched a workflow that includes peaceiris/actions-gh-pages
to use a self-hosted runner.
When using peaceiris/actions-gh-pages@v3
and when the output branch doesn’t already exist, the deploy step succeeded but placed the published data under a prefix, i.e. the output was written to undefined/actions_github_pages_1651252139745/test.json
instead of just test.json
. Here are links for the workflow, the job log, and output branch. Some key lines of output:
INFO:nxontology_data.utils:Wrote ontology to /actions-runner/_work/nxontology-data/nxontology-data/output/test/test.json
...
/usr/bin/git clone --depth=1 --single-branch --branch output/test ***github.com/related-sciences/nxontology-data.git undefined/actions_github_pages_1651252139745
Cloning into 'undefined/actions_github_pages_1651252139745'...
warning: Could not find remote branch output/test to clone.
fatal: Remote branch output/test not found in upstream origin
[INFO] first deployment, create new branch output/test
[INFO] The process '/usr/bin/git' failed with exit code 128
[INFO] chdir undefined/actions_github_pages_16512521397[45](https://github.com/related-sciences/nxontology-data/runs/6232229406?check_suite_focus=true#step:6:45)
/usr/bin/git init
Initialized empty Git repository in /actions-runner/_work/nxontology-data/nxontology-data/undefined/actions_github_pages_1651252139745/.git/
/usr/bin/git checkout --orphan output/test
Switched to a new branch 'output/test'
[INFO] prepare publishing assets
[INFO] create undefined/actions_github_pages_1651252139745
[INFO] copy /actions-runner/_work/nxontology-data/nxontology-data/output/test to undefined/actions_github_pages_1651252139745
cp: no such file or directory: /actions-runner/_work/nxontology-data/nxontology-data/output/test/.*
When using peaceiris/actions-gh-pages@main
, I got a failure:
Error: File not found: '/actions-runner/_work/_actions/peaceiris/actions-gh-pages/main/lib/index.js'
When using peaceiris/actions-gh-pages@v3
but when the output branch already exists, I get:
/usr/bin/git push origin output/test
To https://github.com/related-sciences/nxontology-data.git
! [rejected] output/test -> output/test (fetch first)
error: failed to push some refs to '***github.com/related-sciences/nxontology-data.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error: Action failed with "The process '/usr/bin/git' failed with exit code 1"
So not sure exactly how to proceed.
Relevant links
Public repository: https://github.com/related-sciences/nxontology-data YAML config: https://github.com/related-sciences/nxontology-data/blob/6b43ce4927641f43baebc3e077e0c56a32fdf53f/.github/workflows/create.yaml
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top GitHub Comments
@peaceiris hoping to catch your eye here, especially since this would be great to get fixed in the next major release. The issue is that content is deployed to a directory like
undefined/actions_github_pages_1651252139745
rather than being placed in the root of the branch.I’m having this issue using a self-hosted runner and @pavlovp experienced this issue when setting
force_orphan: true
.@peaceiris any insights here? Happy to help diagnose.