question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support: self-hosted runner publishes directory with weird prefix

See original GitHub issue

I 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:open
  • Created a year ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dhimmelcommented, Oct 20, 2022

@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.

1reaction
dhimmelcommented, May 7, 2022

@peaceiris any insights here? Happy to help diagnose.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Self-hosted runner with Docker step creates files that trip up ...
So git clean -ffdx tried to stat() this foo/ directory (created via a container in a previous build) but failed. It was then...
Read more >
Build your own self-hosted CI/CD workflow with GitHub actions
This article will focus on creating our workflow hosted in our dedicated servers (self-hosted). Self-hosted runners offer more control of ...
Read more >
Formula Cookbook - Homebrew Documentation
A formula is a package definition written in Ruby. It can be created with brew create <URL> where <URL> is a zip or...
Read more >
Machine runner configuration reference - CircleCI
This prefix takes a YAML list of arguments that wraps and runs the task-agent. For example, sudo can elevate permissions: runner: command_prefix: ...
Read more >
Learning the Basics - Gradle User Manual
This adds repositories which look into one or more directories for finding dependencies. This type of repository does not support any meta-data formats...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found