Skip to content
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

Wrong path used for rsync #84

Closed
kokarn opened this issue Dec 18, 2019 · 4 comments
Closed

Wrong path used for rsync #84

kokarn opened this issue Dec 18, 2019 · 4 comments
Labels
version 3 Issues related to version 3 of this action.

Comments

@kokarn
Copy link

kokarn commented Dec 18, 2019

Describe the bug

Fails to run because it's lookin in the wrong folder. When specifying build it tries to look in
/home/runner/work/tarkov-tools/tarkov-tools//build for my repo tarkov-tools

rsync: change_dir "/home/runner/work/tarkov-tools/tarkov-tools//build" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]

Reproduce

name: Build and Deploy
on: [push]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    
    steps:
    - name: Checkout
      uses: actions/checkout@v1

    - name: Build and Deploy
      uses: JamesIves/github-pages-deploy-action@releases/v3
      with:
        ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        BASE_BRANCH: master # The branch the action should deploy from.
        BRANCH: gh-pages # The branch the action should deploy to.
        FOLDER: build # The folder the action should deploy.
        CLEAN: true

Expected behavior

Actually works :D

Additional Comments

Full log:

Run JamesIves/github-pages-deploy-action@releases/v3
  with:
    ACCESS_TOKEN: ***
    BASE_BRANCH: master
    BRANCH: gh-pages
    FOLDER: build
    CLEAN: true
git init
Reinitialized existing Git repository in /home/runner/work/tarkov-tools/tarkov-tools/.git/
git config user.name kokarn
git config user.email kokarn@gmail.com
git ls-remote --heads https://***@github.com/kokarn/tarkov-tools.git gh-pages | wc -l
955e534a3ab92c619b3a5502097c134ca4e809dd	refs/heads/gh-pages
git checkout master
Switched to a new branch 'master'
Branch 'master' set up to track remote branch 'master' from 'origin'.
git fetch https://***@github.com/kokarn/tarkov-tools.git
From https://github.com/kokarn/tarkov-tools
 * branch            HEAD       -> FETCH_HEAD
git worktree add --checkout gh-action-temp-deployment-folder origin/gh-pages
Preparing worktree (detached HEAD 955e534)
HEAD is now at 955e534 Updates
rsync -q -av --progress build/. gh-action-temp-deployment-folder --delete --exclude CNAME --exclude .nojekyll --exclude .git --exclude .github
rsync: change_dir "/home/runner/work/tarkov-tools/tarkov-tools//build" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]

Might be worth noting that it seems /build "works" but also looks in the wrong folder OFC

Run JamesIves/github-pages-deploy-action@releases/v3
  with:
    ACCESS_TOKEN: ***
    BASE_BRANCH: master
    BRANCH: gh-pages
    FOLDER: /build
    CLEAN: true
##[error]The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.
git ls-remote --heads https://***@github.com/kokarn/tarkov-tools.git gh-pages | wc -l
955e534a3ab92c619b3a5502097c134ca4e809dd	refs/heads/gh-pages
git checkout master
Switched to a new branch 'master'
Branch 'master' set up to track remote branch 'master' from 'origin'.
git fetch https://***@github.com/kokarn/tarkov-tools.git
From https://github.com/kokarn/tarkov-tools
 * branch            HEAD       -> FETCH_HEAD
git worktree add --checkout gh-action-temp-deployment-folder origin/gh-pages
Preparing worktree (detached HEAD 955e534)
HEAD is now at 955e534 Updates
rsync -q -av --progress /build/. gh-action-temp-deployment-folder --delete --exclude CNAME --exclude .nojekyll --exclude .git --exclude .github
rsync: change_dir "/build" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
##[error]The process 'rsync' failed with exit code 23
Completed Deployment
##[error]Node run failed with exit code 1
@kokarn
Copy link
Author

kokarn commented Dec 18, 2019

This was me forgetting to build in the right workflow... 0 points to me.

@kokarn kokarn closed this as completed Dec 18, 2019
@JamesIves JamesIves added the version 3 Issues related to version 3 of this action. label Dec 18, 2019
@zeyadetman
Copy link

I'm facing this issue, and can't solve it

@kokarn
Copy link
Author

kokarn commented Dec 28, 2019

For me the problem was that I did 2 separate checkouts, and only built in one

@JamesIves
Copy link
Owner

I'm facing this issue, and can't solve it

I'd need to see your workflow file in order to support with this Please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version 3 Issues related to version 3 of this action.
Projects
None yet
Development

No branches or pull requests

3 participants