New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment fails if BRANCH already exists on remote #43
Comments
I cloned your action locally to test the deployment and added some echo statements. I found out that
|
I tested I update this command with
and it is working. I don't know what the issue was or is it the correct way of doing it. Please suggest. |
My team also ran into this issue as well. We believed the issue was due to GitHub not liking that there was only ever a single commit in the A bulk of the changes are in this commit but the current Note: My fork is ran in an ubuntu / python image so we can build docs and such. On higher level, I would assume these issues are naturally resolved by version three and both @sudkumar and my fixes are temporary solutions until that is released. |
@JacksonMaxfield Thanks. Yours is much better than mine as keeping the history is essential. My |
Just catching up on this now as I’ve been traveling. I’ll see what I can do about pushing up version 3 this weekend. |
@JamesIves Thank you. Please let me know if any way I can help in the release. |
#44 PR is up for the release, still a few more things to finish up but it should be testable now. |
Alright! I've finalized most of the details and I'm ready for some people to give this a try. I'd love to push this up before I fly to San Francisco for Chrome Dev Summit. You can try the beta out using the following: |
Hi @JamesIves I tried the git ls-remote --heads https://***@github.com/sudkumar/sudkumar.github.io.git master | wc -l
068dab7e7778d41ef7391d733959ef0af48e2c6b refs/heads/master
git checkout src
fatal: 'src' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate
##[error]The process 'git' failed with exit code 128
Deployment Successful!
##[error]Node run failed with exit code 1 LogsRun JamesIves/github-pages-deploy-action@releases/v3-beta
git init
Reinitialized existing Git repository in /home/runner/work/sudkumar.github.io/sudkumar.github.io/.git/
git config user.name sudkumar
git config user.email 6812992+sudkumar@users.noreply.github.com
git ls-remote --heads https://***@github.com/sudkumar/sudkumar.github.io.git master | wc -l
068dab7e7778d41ef7391d733959ef0af48e2c6b refs/heads/master
git checkout src
fatal: 'src' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate
##[error]The process 'git' failed with exit code 128
Deployment Successful!
##[error]Node run failed with exit code 1 Workflowname: Build and Deploy
on:
push:
branches:
- src
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Use Node.js
uses: actions/setup-node@v1
- name: Install
env:
CI: true
run: |
npm ci
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
id: semantic # Need an `id` for output variables
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: 000000000000000
- name: Build
env:
CI: true
run: |
npm run-script build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3-beta
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BASE_BRANCH: src # The branch the action should deploy from.
BRANCH: master # The branch the action should deploy to.
FOLDER: public # The folder the action should deploy.
BUILD_SCRIPT: npm run-script build # The build script the action should run prior to deploying.
COMMIT_NAME: Sudhir Mitharwal |
Describe the bug
I have developed a portfolio website of mine which I want to host on github pages at https://sudkumar.github.io/. My development branch is
src
and themaster
branch should contain the website code (build folder). I have integrated the actions and it worked for the first deployment and created a master branch from my build folder (here). But when deploying again (now the master branch already exists on remote), the deployment deletes themaster
branch without creating it again (here). And this happens for all alternate deployments.It throws this error.
Deploying to GitHub... Error: Use --prefix instead of bare filenames. To https://github.com/sudkumar/sudkumar.github.io.git - [deleted] master Deployment succesful!
Reproduce
Please have a look at my deployment actions
Expected behavior
I expect it to push the new deployment to the master branch with the new commit.
Work Around
I have created a step to delete the master branch before the deployment step.
https://github.com/sudkumar/sudkumar.github.io/blob/5e166f27170660561d48156fd45498b627ec40ae/.github/workflows/deploy.yml#L16-L23
Please let me know if you need more details or I can be of some help in resolving this issue.
The text was updated successfully, but these errors were encountered: