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

Docker run failed with exit code 1 #36

Closed
vhoyer opened this issue Oct 12, 2019 · 6 comments
Closed

Docker run failed with exit code 1 #36

vhoyer opened this issue Oct 12, 2019 · 6 comments
Labels
bug 🐝 This issue describes a bug. version 3 Issues related to version 3 of this action.
Milestone

Comments

@vhoyer
Copy link

vhoyer commented Oct 12, 2019

Describe the bug

https://github.com/vhoyer/timedReport

...
Setting up libjq1:amd64 (1.5+dfsg-1.3) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Setting up jq (1.5+dfsg-1.3) ...
Reinitialized existing Git repository in /github/workspace/.git/
Switched to a new branch 'master'
Branch master set up to track remote branch master from origin.
Running build scripts... 
Deploying to GitHub...
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Docker run failed with exit code 1

Reproduce

name: Build and Deploy
on:
  push:
    branches:
      - master
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    # https://github.com/marketplace/actions/deploy-to-github-pages
    - name: Deploy to GitHub Pages
      uses: JamesIves/github-pages-deploy-action@master
      env:
        ACCESS_TOKEN: ${{ secrets.GH_PAGES_DEPLOY_ACCESS_TOKEN }}
        BASE_BRANCH: master
        BRANCH: gh-pages # The branch the action should deploy to.
        FOLDER: src # The folder the action should deploy.

Folder struct:

.
├── package.json
├── package-lock.json
└── src
    ├── components
    │   ├── card.js
    │   ├── context.css
    │   ├── context.js
    │   └── my-footer.js
    ├── css.css
    ├── index.html
    ├── js.js
    └── resources
        └── body-bg.svg

Expected behavior

Deploy to gh pages

Additional Comments

logs_10.zip

@vhoyer
Copy link
Author

vhoyer commented Oct 12, 2019

probably the #5 error, so I'll close this issue and watch the other, sorry for opening the redundant issue :D

@vhoyer vhoyer closed this as completed Oct 12, 2019
@vhoyer
Copy link
Author

vhoyer commented Oct 12, 2019

ok, it wasn't it

@vhoyer vhoyer reopened this Oct 12, 2019
@JamesIves
Copy link
Owner

Can you verify that your GitHub token has the correct permissions granted? This is a pretty vague error.

@JamesIves JamesIves added the support ❓ Issues related to action support. label Oct 16, 2019
@MLKiiwy
Copy link

MLKiiwy commented Oct 16, 2019

I confirm I get the same error but I found why: nothing related to your permissions.

The field BUILD_SCRIPT is mandatory because if you not modify your branch during the process the two branches are going to be equal so this line: https://github.com/JamesIves/github-pages-deploy-action/blob/master/entrypoint.sh#L87 will not add anything because what you want to add is already part of your repo.

So if your folder is /src it's already commited on master so the script fail.

To fix it:

FOLDER: dist
BUILD_SCRIPT: mkdir dist && mv src/* dist

Yep that's a bit stupid.

I suggest to change the last lines of the entryscript, to use git worktree.
I'll try to open a PR.

@JamesIves JamesIves added bug 🐝 This issue describes a bug. and removed support ❓ Issues related to action support. labels Oct 16, 2019
@JamesIves
Copy link
Owner

Appreciate that, thanks @MLKiiwy !

@JamesIves
Copy link
Owner

The changes referenced by @MLKiiwy are all available in the v3 beta. If you wouldn't mind giving it a try you can use it using JamesIves/github-pages-deploy-action@releases/v3-beta. If you spot any issues please let me know!

@JamesIves JamesIves added the version 3 Issues related to version 3 of this action. label Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐝 This issue describes a bug. version 3 Issues related to version 3 of this action.
Projects
None yet
Development

No branches or pull requests

3 participants