Code Monkey home page Code Monkey logo

Comments (10)

JamesIves avatar JamesIves commented on May 12, 2024 3

#44 PR is up for the release, still a few more things to finish up but it should be testable now.

from github-pages-deploy-action.

sudkumar avatar sudkumar commented on May 12, 2024 1

Hi @JamesIves I tried the v3-beta but got the following error.

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

Deployment

Logs
Run 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 [email protected]
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
Workflow
name: 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

from github-pages-deploy-action.

sudkumar avatar sudkumar commented on May 12, 2024

I cloned your action locally to test the deployment and added some echo statements. I found out that git subtree split --prefix $FOLDER $BASE_BRANCH throws this error when deploying again.

Error: Use --prefix instead of bare filenames.

from github-pages-deploy-action.

sudkumar avatar sudkumar commented on May 12, 2024

I tested git subtree split --prefix $FOLDER $BASE_BRANCH locally to get the hash and it works just fine. It may be an issue with git version but I am not sure.

I update this command with

https://github.com/sudkumar/github-pages-deploy-action/blob/6948c4c28cb32c78204f2fc8686ec8dc9ea87537/entrypoint.sh#L88-L92

git subtree split --prefix $FOLDER --branch ${BASE_BRANCH}_build

and it is working. I don't know what the issue was or is it the correct way of doing it. Please suggest.

from github-pages-deploy-action.

evamaxfield avatar evamaxfield commented on May 12, 2024

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 gh-pages branch / whichever branch you deploy to. Something to do with their caching mechanism maybe? Regardless, we also wanted there to be a git history for the deploy branch so we made more extensive changes.

A bulk of the changes are in this commit but the current @master version is here.

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.

from github-pages-deploy-action.

sudkumar avatar sudkumar commented on May 12, 2024

@JacksonMaxfield Thanks. Yours is much better than mine as keeping the history is essential. My gh-pages stopped working (no idea why 😕 ) after the actions integration. I will give yous a try.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024

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.

from github-pages-deploy-action.

sudkumar avatar sudkumar commented on May 12, 2024

@JamesIves Thank you. Please let me know if any way I can help in the release.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024

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: JamesIves/github-pages-deploy-action@releases/v3-beta. Let me know if you spot any issues.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024

Moving this to its own issue @sudkumar #45

from github-pages-deploy-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.