benchmark-action / benchmark-action/github-action-benchmark
gh-pages branch should be created manually beforehand
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 184
- PR merge metrics
- No merged PRs in 30d
Description
This should be reflected either on the docs or automated in the code, otherwise a first run will fail, i.e:

Ideally I should be created based on `ghPagesBranch` config in `write.ts`, right before fetching for that branch specifically, otherwise it'll fail as shown above:
``` typescript
if (githubToken && !skipFetchGhPages && ghRepository) {
benchmarkBaseDir = './benchmark-data-repository';
await git.clone(githubToken, ghRepository, benchmarkBaseDir);
extraGitArguments = [`--work-tree=${benchmarkBaseDir}`, `--git-dir=${benchmarkBaseDir}/.git`];
// TODO: Create gh_pages branch if not already present? <----
await git.checkout(ghPagesBranch, extraGitArguments);
} else if (!skipFetchGhPages && (!isPrivateRepo || githubToken)) {
await git.pull(githubToken, ghPagesBranch);
} else if (isPrivateRepo && !skipFetchGhPages) {
core.warning(
"'git pull' was skipped. If you want to ensure GitHub Pages branch is up-to-date " +
"before generating a commit, please set 'github-token' input to pull GitHub pages branch",
);
} else {
```
Putting this as an issue first to see what main devs think?
Contributor guide
Assessment
This issue has not been assessed yet.