Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork398
Open
Description
In a GitHub action, I create a fresh repo with
-name:Create new GitHub repositoryrun:| curl \ --request POST \ --header "Accept: application/vnd.github+json" \ --header "Authorization: Bearer ${{ secrets.MY_TOKEN }}"\ --header "X-GitHub-Api-Version: 2022-11-28" \ --data '{ "name": "foobar", "private": true, "visibility": "private", }' \ --url "https://api.github.com/orgs/<org>/repos"
I'd like to deploy to this repo with
-name:Deploy to GitHubuses:JamesIves/github-pages-deploy-action@v4with:token:${{ secrets.MY_TOKEN }}repository-name:"<org>/foobar"branch:mainfolder:deploy/single-commit:true
This then fails with
Checking configuration and starting deployment… 🚦Deploying using Deploy Token… 🔑Configuring git…/usr/bin/git config --global --add safe.directory /__w/baz/baz/usr/bin/git config user.name nschloe/usr/bin/git config user.email nschloe@users.noreply.github.com/usr/bin/git config core.ignorecase false/usr/bin/git config --local --unset-all http.https://github.com/.extraheader/usr/bin/git remote rm origin/usr/bin/git remote add origin ***github.com/<org>/foobar.gitGit configured… 🔧Starting to commit changes…/usr/bin/git ls-remote --heads ***github.com/<org>/foobar.git refs/heads/mainCreating worktree…/usr/bin/git worktree add --no-checkout --detach github-pages-deploy-action-temp-deployment-folderPreparing worktree (detached HEAD fb01a93)/usr/bin/git checkout --orphan mainfatal: A branch named 'main' already exists.Any idea what's going wrong?